From: Dan Carpenter <error27@gmail.com>
To: netdev@vger.kernel.org
Cc: Jiri Pirko <jpirko@redhat.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
"David S. Miller" <davem@davemloft.net>,
kernel-janitors@vger.kernel.org
Subject: [patch] skfp: testing the wrong variable in skfp_driver_init()
Date: Fri, 24 Dec 2010 08:17:34 +0300 [thread overview]
Message-ID: <20101224051734.GO1936@bicker> (raw)
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);
next reply other threads:[~2010-12-24 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 5:17 Dan Carpenter [this message]
2010-12-24 8:45 ` [patch] skfp: testing the wrong variable in skfp_driver_init() Jiri Pirko
2010-12-28 21:55 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101224051734.GO1936@bicker \
--to=error27@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hsweeten@visionengravers.com \
--cc=jpirko@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).