Skip to content

Commit

Permalink
skfp: testing the wrong variable in skfp_driver_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 28, 2010
1 parent d39cd5e commit 4a5fc4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/skfp/skfddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
bp->SharedMemSize,
&bp->SharedMemDMA);
if (!bp->SharedMemSize) {
if (!bp->SharedMemAddr) {
printk("could not allocate mem for ");
printk("hardware module: %ld byte\n",
bp->SharedMemSize);
Expand Down

0 comments on commit 4a5fc4e

Please sign in to comment.