Commit 4160d9ec authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

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: 6c30384e ("net: mscc: ocelot: register devlink ports")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/YBkXyFIl4V9hgxYM@mwandaSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e0c16233
...@@ -1300,8 +1300,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev) ...@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment