From: Jiri Pirko <jpirko@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
"David S. Miller" <davem@davemloft.net>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] skfp: testing the wrong variable in skfp_driver_init()
Date: Fri, 24 Dec 2010 09:45:39 +0100 [thread overview]
Message-ID: <20101224084538.GA2791@psychotron.redhat.com> (raw)
In-Reply-To: <20101224051734.GO1936@bicker>
Fri, Dec 24, 2010 at 06:17:34AM CET, error27@gmail.com wrote:
>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);
Looks obvious.
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
next prev parent reply other threads:[~2010-12-24 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 5:17 [patch] skfp: testing the wrong variable in skfp_driver_init() Dan Carpenter
2010-12-24 8:45 ` Jiri Pirko [this message]
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=20101224084538.GA2791@psychotron.redhat.com \
--to=jpirko@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=error27@gmail.com \
--cc=hsweeten@visionengravers.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).