projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16a665f
)
usb: phy: use kzalloc to allocate struct tegra_usb_phy
author
Venu Byravarasu
<vbyravarasu@nvidia.com>
Sat, 12 Jan 2013 00:31:29 +0000
(17:31 -0700)
committer
Stephen Warren
<swarren@nvidia.com>
Mon, 28 Jan 2013 18:20:04 +0000
(11:20 -0700)
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>
drivers/usb/phy/tegra_usb_phy.c
patch
|
blob
|
history
diff --git
a/drivers/usb/phy/tegra_usb_phy.c
b/drivers/usb/phy/tegra_usb_phy.c
index 9d13c81754e0cd0d2b38299dcb6143847ad380b2..2d3cae9a785d1ab3f70c37ade00d6cbf9d05cadb 100644
(file)
--- 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 = k
m
alloc(sizeof(struct tegra_usb_phy), GFP_KERNEL);
+ phy = k
z
alloc(sizeof(struct tegra_usb_phy), GFP_KERNEL);
if (!phy)
return ERR_PTR(-ENOMEM);