summaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-01-23 12:25:08 +0000
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-23 11:09:49 -0800
commit4384247b6910df91049f8d0bbd5c1075898ac290 (patch)
tree954249cc28ac8bd3cfc5f61de344d92dc58687f5 /drivers/net/s2io.c
parent0a3c4bdc1b197a7d37fc75643a68daf45fe0a7cc (diff)
downloadblackbird-op-linux-4384247b6910df91049f8d0bbd5c1075898ac290.tar.gz
blackbird-op-linux-4384247b6910df91049f8d0bbd5c1075898ac290.zip
[PATCH] 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: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/s2io.c')
-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)
}
}
- nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL);
+ nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL);
if (!nic->ufo_in_band_v)
return -ENOMEM;
- memset(nic->ufo_in_band_v, 0, size);
/* Allocation and initialization of RXDs in Rings */
size = 0;
OpenPOWER on IntegriCloud