mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
net: ag71xx: check error for platform_get_irq
Complete error handling for a failed platform_get_irq() call
Fixes: d51b6ce441 ("net: ethernet: add ag71xx driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20260516212616.11758-1-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7769d17e02
commit
e7c70bf97e
|
|
@ -1856,6 +1856,9 @@ static int ag71xx_probe(struct platform_device *pdev)
|
|||
ag71xx_int_disable(ag, AG71XX_INT_POLL);
|
||||
|
||||
ndev->irq = platform_get_irq(pdev, 0);
|
||||
if (ndev->irq < 0)
|
||||
return ndev->irq;
|
||||
|
||||
err = devm_request_irq(&pdev->dev, ndev->irq, ag71xx_interrupt,
|
||||
0x0, dev_name(&pdev->dev), ndev);
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user