mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
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:
committed by
Jakub Kicinski
parent
e0c1623357
commit
4160d9ec5b
@@ -1300,8 +1300,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
|
||||
goto out_free_devlink;
|
||||
|
||||
irq_xtr = platform_get_irq_byname(pdev, "xtr");
|
||||
if (irq_xtr < 0)
|
||||
if (irq_xtr < 0) {
|
||||
err = irq_xtr;
|
||||
goto out_free_devlink;
|
||||
}
|
||||
|
||||
err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL,
|
||||
ocelot_xtr_irq_handler, IRQF_ONESHOT,
|
||||
|
||||
Reference in New Issue
Block a user