]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: fix checking for return value of platform_get_irq_byname()
authorLi Qiong <liqiong@nfschina.com>
Fri, 12 Aug 2022 03:09:54 +0000 (11:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Aug 2022 10:29:46 +0000 (11:29 +0100)
commit0125586fe9173e727426ffe00bd8c1468f789d96
tree80fac824e1861a7e2929197cfa8156130995e8a9
parent5f87c4ade59e1230a6c8a967b50ee9c6d7192894
net: lan966x: fix checking for return value of platform_get_irq_byname()

The platform_get_irq_byname() returns non-zero IRQ number
or negative error number. "if (irq)" always true, chang it
to "if (irq > 0)"

Signed-off-by: Li Qiong <liqiong@nfschina.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c