Skip to content

Commit

Permalink
net: mscc: ocelot: fix error code in mscc_ocelot_probe()
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Feb 4, 2021
1 parent e0c1623 commit 4160d9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/mscc/ocelot_vsc7514.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4160d9e

Please sign in to comment.