Browse Source

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 <vbyravarasu@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Venu Byravarasu 12 years ago
parent
commit
5b26c94cdc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/phy/tegra_usb_phy.c

+ 1 - 1
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);