From: Venu Byravarasu Date: Sat, 12 Jan 2013 00:31:29 +0000 (-0700) Subject: usb: phy: use kzalloc to allocate struct tegra_usb_phy X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71;p=deliverable%2Flinux.git 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 --- 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);