netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: David Miller <davem@davemloft.net>, bianpan201602@163.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bianpan2016@163.com
Subject: Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks
Date: Mon, 24 Apr 2017 12:52:09 -0700	[thread overview]
Message-ID: <dc7e4db5-9bcf-1216-7f6e-aef20b4bba53@gmail.com> (raw)
In-Reply-To: <20170424.154806.387657447648095027.davem@davemloft.net>

On 04/24/2017 12:48 PM, David Miller wrote:
> From: Pan Bian <bianpan201602@163.com>
> Date: Sun, 23 Apr 2017 18:01:05 +0800
> 
>> From: Pan Bian <bianpan2016@163.com>
>>
>> Function platform_get_irq() will return a negative value on errors.
>> However, in function bcmgenet_probe(), 0 is considered as a flag of
>> error. This patch fixes the bug by checking whether the return value of
>> platform_get_irq() is less than 0.
>>
>> Signed-off-by: Pan Bian <bianpan2016@163.com>
> 
> I'm definitely not confident enough to apply this.
> 
> On some platform zero IRQs are invalid.
> 
> There are also lots of pieces of code that check the return value ">
> 0" as success.
> 

I don't think we are fixing any real issue by applying this patch, but I
will do a check on ARM, ARM64 and MIPS where this driver is used to see
if it is even remotely possible to have a 0 IRQ.
-- 
Florian

      reply	other threads:[~2017-04-24 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-23 10:01 [PATCH 1/1] net: bcmgenet: fix incorrect return value checks Pan Bian
2017-04-24 19:48 ` David Miller
2017-04-24 19:52   ` Florian Fainelli [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=dc7e4db5-9bcf-1216-7f6e-aef20b4bba53@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bianpan201602@163.com \
    --cc=bianpan2016@163.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@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).