[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101224051734.GO1936@bicker>
Date: Fri, 24 Dec 2010 08:17:34 +0300
From: Dan Carpenter <error27@...il.com>
To: netdev@...r.kernel.org
Cc: Jiri Pirko <jpirko@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
"David S. Miller" <davem@...emloft.net>,
kernel-janitors@...r.kernel.org
Subject: [patch] 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@...il.com>
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 0a66fed..16c6265 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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists