aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-01-23 07:25:08 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-23 16:26:33 -0500
commit3196265e97c661d9e9be04d5d64ca8ff3186536d (patch)
treecd99642b956a7d8a16751de28a3c778e291426c2 /drivers/net
parent184231bdb41fc4c385ae8e115f5afaff02fe1690 (diff)
s2io bogus memset
memset() after kmalloc() on size * 8 would better be on size * 8, not just size; fixed by switching to kcalloc() - it's more idiomatic anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/s2io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 250cdbeefdfd..1dd66b8ea0fa 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic)
556 } 556 }
557 } 557 }
558 558
559 nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL); 559 nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL);
560 if (!nic->ufo_in_band_v) 560 if (!nic->ufo_in_band_v)
561 return -ENOMEM; 561 return -ENOMEM;
562 memset(nic->ufo_in_band_v, 0, size);
563 562
564 /* Allocation and initialization of RXDs in Rings */ 563 /* Allocation and initialization of RXDs in Rings */
565 size = 0; 564 size = 0;