Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

skfp: testing the wrong variable in skfp_driver_init()

The intent here was to test if the allocation failed but we tested
"SharedMemSize" instead of "SharedMemAddr" by mistake.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dan Carpenter and committed by
David S. Miller
4a5fc4e1 d39cd5e9

+1 -1
+1 -1
drivers/net/skfp/skfddi.c
··· 412 412 bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev, 413 413 bp->SharedMemSize, 414 414 &bp->SharedMemDMA); 415 - if (!bp->SharedMemSize) { 415 + if (!bp->SharedMemAddr) { 416 416 printk("could not allocate mem for "); 417 417 printk("hardware module: %ld byte\n", 418 418 bp->SharedMemSize);