]> 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)
commit6e7c40bbfeec4ac0478de077bb56d6dd4c41aeb8
tree80fac824e1861a7e2929197cfa8156130995e8a9
parent4e2dec06ffe6707bbd4c9eb44b6c07e808666e00
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