public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] qlcnic: use vzalloc() instead of vmalloc()/memset(0)
@ 2014-01-07 13:48 Wei Yongjun
  2014-01-07 18:22 ` Jitendra Kalsaria
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2014-01-07 13:48 UTC (permalink / raw)
  To: himanshu.madhani, rajesh.borundia, shahed.shaikh,
	jitendra.kalsaria, sony.chacko, sucheta.chakraborty
  Cc: yongjun_wei, linux-driver, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use vzalloc() instead of vmalloc() and memset(0).

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
index b529667..16912e2 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
@@ -935,11 +935,10 @@ static ssize_t qlcnic_sysfs_read_pci_config(struct file *file,
 		return QL_STATUS_INVALID_PARAM;
 
 	pci_info_sz = pci_func_count * sizeof(*pci_info);
-	pci_info = vmalloc(pci_info_sz);
+	pci_info = vzalloc(pci_info_sz);
 	if (!pci_info)
 		return -ENOMEM;
 
-	memset(pci_info, 0, pci_info_sz);
 	memset(buf, 0, pci_cfg_sz);
 	pci_cfg = (struct qlcnic_pci_func_cfg *)buf;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-07 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 13:48 [PATCH -next] qlcnic: use vzalloc() instead of vmalloc()/memset(0) Wei Yongjun
2014-01-07 18:22 ` Jitendra Kalsaria
2014-01-07 19:14   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox