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: 6c30384eb1
("net: mscc: ocelot: register devlink ports")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/YBkXyFIl4V9hgxYM@mwanda
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e0c1623357
commit
4160d9ec5b
|
@ -1300,8 +1300,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
|
||||||
goto out_free_devlink;
|
goto out_free_devlink;
|
||||||
|
|
||||||
irq_xtr = platform_get_irq_byname(pdev, "xtr");
|
irq_xtr = platform_get_irq_byname(pdev, "xtr");
|
||||||
if (irq_xtr < 0)
|
if (irq_xtr < 0) {
|
||||||
|
err = irq_xtr;
|
||||||
goto out_free_devlink;
|
goto out_free_devlink;
|
||||||
|
}
|
||||||
|
|
||||||
err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL,
|
err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL,
|
||||||
ocelot_xtr_irq_handler, IRQF_ONESHOT,
|
ocelot_xtr_irq_handler, IRQF_ONESHOT,
|
||||||
|
|
Loading…
Reference in New Issue