Skip to content

Commit 4160d9e

Browse files
Dan Carpenterkuba-moo
authored andcommitted
net: mscc: ocelot: fix error code in mscc_ocelot_probe()
Probe should return an error code if platform_get_irq_byname() fails but it returns success instead. Fixes: 6c30384 ("net: mscc: ocelot: register devlink ports") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/YBkXyFIl4V9hgxYM@mwanda Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e0c1623 commit 4160d9e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/mscc/ocelot_vsc7514.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,8 +1300,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
13001300
goto out_free_devlink;
13011301

13021302
irq_xtr = platform_get_irq_byname(pdev, "xtr");
1303-
if (irq_xtr < 0)
1303+
if (irq_xtr < 0) {
1304+
err = irq_xtr;
13041305
goto out_free_devlink;
1306+
}
13051307

13061308
err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL,
13071309
ocelot_xtr_irq_handler, IRQF_ONESHOT,

0 commit comments

Comments
 (0)