Skip to content

Commit

Permalink
[NET]: com90xx kmalloc fix
Browse files Browse the repository at this point in the history
WARNING: "__you_cannot_kzalloc_that_much" [drivers/net/arcnet/com90xx.ko] undefined!

We're trying to allocate negative amounts of memory..

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Morton authored and davem330 committed Apr 1, 2006
1 parent 5c516c1 commit 15901dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/arcnet/com90xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ static void __init com90xx_probe(void)
if (!io && !irq && !shmem && !*device && com90xx_skip_probe)
return;

shmems = kzalloc(((0x10000-0xa0000) / 0x800) * sizeof(unsigned long),
shmems = kzalloc(((0x100000-0xa0000) / 0x800) * sizeof(unsigned long),
GFP_KERNEL);
if (!shmems)
return;
iomem = kzalloc(((0x10000-0xa0000) / 0x800) * sizeof(void __iomem *),
iomem = kzalloc(((0x100000-0xa0000) / 0x800) * sizeof(void __iomem *),
GFP_KERNEL);
if (!iomem) {
kfree(shmems);
Expand Down

0 comments on commit 15901dc

Please sign in to comment.