summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorVenu Byravarasu2013-01-12 01:31:29 +0100
committerStephen Warren2013-01-28 19:20:04 +0100
commit5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71 (patch)
treeafd5a8653a23f7c25cd8f82fbfe70278b832313d /drivers/usb
parentARM: tegra: remove USB address related macros from iomap.h (diff)
downloadkernel-qcow2-linux-5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71.tar.gz
kernel-qcow2-linux-5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71.tar.xz
kernel-qcow2-linux-5b26c94cdc1a201f3ae1aa75bf8963da53e1aa71.zip
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/phy/tegra_usb_phy.c2
1 files changed, 1 insertions, 1 deletions
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);