From 5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Fri, 11 Jan 2013 17:31:29 -0700 Subject: [PATCH] usb: phy: use kzalloc to allocate struct tegra_usb_phy Use kzalloc instead of kmalloc to allocate struct tegra_usb_phy. This ensures that all function pointers in member u_phy are initialized to NULL. Signed-off-by: Venu Byravarasu Acked-by: Greg Kroah-Hartman Signed-off-by: Stephen Warren --- drivers/usb/phy/tegra_usb_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/tegra_usb_phy.c b/drivers/usb/phy/tegra_usb_phy.c index 9d13c81754e0..2d3cae9a785d 100644 --- a/drivers/usb/phy/tegra_usb_phy.c +++ b/drivers/usb/phy/tegra_usb_phy.c @@ -740,7 +740,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, int i; int err; - phy = kmalloc(sizeof(struct tegra_usb_phy), GFP_KERNEL); + phy = kzalloc(sizeof(struct tegra_usb_phy), GFP_KERNEL); if (!phy) return ERR_PTR(-ENOMEM);