All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] skfp: testing the wrong variable in skfp_driver_init()
@ 2010-12-24  5:17 ` Dan Carpenter
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

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

Thread overview: 6+ 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  5:17 ` Dan Carpenter
2010-12-24  8:45 ` Jiri Pirko
2010-12-24  8:45   ` Jiri Pirko
2010-12-28 21:55   ` David Miller
2010-12-28 21:55     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.