]> git.baikalelectronics.ru Git - kernel.git/commit
bcmgenet: add WOL IRQ check
authorSergey Shtylyov <s.shtylyov@omp.ru>
Thu, 13 Jan 2022 19:46:07 +0000 (22:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jan 2022 11:20:06 +0000 (11:20 +0000)
commit7898495dd5a39da2e9d2e9d9bff5c61884001c31
treec016fcf6339bb12d331ba5b01b0e1eff93be083d
parent69945cdc5ef6ef8202f8f2fb68f8ea40b529f9af
bcmgenet: add WOL IRQ check

The driver neglects to check the result of platform_get_irq_optional()'s
call and blithely passes the negative error codes to devm_request_irq()
(which takes *unsigned* IRQ #), causing it to fail with -EINVAL.
Stop calling devm_request_irq() with the invalid IRQ #s.

Fixes: 87e6b8e31f84 ("net: bcmgenet: request Wake-on-LAN interrupt")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c