Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1629915

Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks
Date 2017-04-24 21:50 +0200
Message-ID <tzS9H-2HD-13@gated-at.bofh.it> (permalink)
References <tzmCR-794-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] net: bcmgenet: fix incorrect return value checks Pan Bian <bianpan201602@163.com> - 2017-04-23 12:10 +0200
  Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks David Miller <davem@davemloft.net> - 2017-04-24 21:50 +0200
    Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks Florian Fainelli <f.fainelli@gmail.com> - 2017-04-24 22:00 +0200

csiph-web