netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] skfp: testing the wrong variable in skfp_driver_init()
@ 2010-12-24  5:17 Dan Carpenter
  2010-12-24  8:45 ` Jiri Pirko
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2010-12-24  5:17 UTC (permalink / raw)
  To: netdev
  Cc: Jiri Pirko, Eric Dumazet, H Hartley Sweeten, David S. Miller,
	kernel-janitors

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>

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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-28 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24  5:17 [patch] skfp: testing the wrong variable in skfp_driver_init() Dan Carpenter
2010-12-24  8:45 ` Jiri Pirko
2010-12-28 21:55   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).