From: David Miller <davem@davemloft.net>
To: bianpan201602@163.com
Cc: f.fainelli@gmail.com, 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 15:48:06 -0400 (EDT) [thread overview]
Message-ID: <20170424.154806.387657447648095027.davem@davemloft.net> (raw)
In-Reply-To: <1492941665-17155-1-git-send-email-bianpan201602@163.com>
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.
next prev parent reply other threads:[~2017-04-24 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 10:01 Pan Bian
2017-04-24 19:48 ` David Miller [this message]
2017-04-24 19:52 ` Florian Fainelli
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=20170424.154806.387657447648095027.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bianpan201602@163.com \
--cc=bianpan2016@163.com \
--cc=f.fainelli@gmail.com \
--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
all inboxes | Powered by JetHome®