usb: phy: use kzalloc to allocate struct tegra_usb_phy
Subsystems (2)
PATCH v3 1/1 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.
---
This patch is v3 patch for the patch discussed at
http://marc.info/?l=linux-kernel&m=135599303216132&w=2
drivers/usb/phy/tegra_usb_phy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/phy/tegra_usb_phy.c +1 -1
@@ -736,7 +736,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev,int err;u8 index = is_legacy_mode ?0 :2 ; - phy =kmalloc (sizeof (struct tegra_usb_phy ),GFP_KERNEL ); + phy =kzalloc (sizeof (struct tegra_usb_phy ),GFP_KERNEL );if (!phy)return ERR_PTR (-ENOMEM );
Signature · 1 line
1.7.0.4
Quoted 3 lines · Venu Byravarasu
Use kzalloc instead of kmalloc to allocate struct
tegra_usb_phy. This ensures that all function pointers in memberu_phyare initialized to NULL.
Seems fine to me. For the record, I'd like to take this through the Tegra tree with all the other Tegra-related USB patches in order to manage any dependencies, with the USB maintainers' Acks. Thanks.
Thanks Stephen.
Venu
Quoted 16 lines
-----Original Message-----
From: Stephen Warren [mailto:[email protected]]
Sent: Saturday, December 22, 2012 2:25 AM
To: Venu Byravarasu
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v3] usb: phy: use kzalloc to allocate structtegra_usb_phyQuoted 3 lines · Venu Byravarasu
Use kzalloc instead of kmalloc to allocate struct
tegra_usb_phy. This ensures that all function pointers in memberu_phyare initialized to NULL.Seems fine to me. For the record, I'd like to take this through the Tegra tree with all the other Tegra-related USB patches in order to manage any dependencies, with the USB maintainers' Acks. Thanks.
Quoted 8 lines · Stephen Warren
Quoted 3 lines · Venu Byravarasu
Use kzalloc instead of kmalloc to allocate struct
tegra_usb_phy. This ensures that all function pointers in memberu_phyare initialized to NULL.Seems fine to me. For the record, I'd like to take this through the Tegra tree with all the other Tegra-related USB patches in order to manage any dependencies, with the USB maintainers' Acks. Thanks.
Stephen Warren
AppliedQuoted 11 lines · Greg KH
Quoted 8 lines · Stephen Warren
Quoted 3 lines · Venu Byravarasu
Use kzalloc instead of kmalloc to allocate struct
tegra_usb_phy. This ensures that all function pointers in memberu_phyare initialized to NULL.Seems fine to me. For the record, I'd like to take this through the Tegra tree with all the other Tegra-related USB patches in order to manage any dependencies, with the USB maintainers' Acks. Thanks.
Thanks, applied to Tegra's for-3.9/usb branch.