Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15901dc9 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller
Browse files

[NET]: com90xx kmalloc fix



WARNING: "__you_cannot_kzalloc_that_much" [drivers/net/arcnet/com90xx.ko] undefined!

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

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c516c10
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);