diff options
author | Dan Carpenter <error27@gmail.com> | 2010-12-23 19:17:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-28 13:54:57 -0800 |
commit | 4a5fc4e179d79c79ad87bfc12a2d7e9b2371e40c (patch) | |
tree | c8d5aa6ca5080097c2927295b6560668e17eca0b /drivers | |
parent | d39cd5e99a0ad88aba6793fb5e5f34e29cda6e6f (diff) | |
download | lwn-4a5fc4e179d79c79ad87bfc12a2d7e9b2371e40c.tar.gz lwn-4a5fc4e179d79c79ad87bfc12a2d7e9b2371e40c.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/skfp/skfddi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 0a66fed52e8e..16c62659cdd9 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c @@ -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); |