netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jpirko@redhat.com
Cc: error27@gmail.com, netdev@vger.kernel.org,
	eric.dumazet@gmail.com, hsweeten@visionengravers.com,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] skfp: testing the wrong variable in skfp_driver_init()
Date: Tue, 28 Dec 2010 13:55:15 -0800 (PST)	[thread overview]
Message-ID: <20101228.135515.48512926.davem@davemloft.net> (raw)
In-Reply-To: <20101224084538.GA2791@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Fri, 24 Dec 2010 09:45:39 +0100

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

Applied, thanks.

      reply	other threads:[~2010-12-28 21:54 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
2010-12-28 21:55   ` David Miller [this message]

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=20101228.135515.48512926.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=error27@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).