diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-02 12:13:44 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-04 03:18:10 +0300 |
commit | 4160d9ec5b41738e3a020b5a18cb5e99e2e9244d (patch) | |
tree | 8bf07c6169177ad5e32af3e0d75578ae541fb48c /drivers/net/ethernet/mscc/ocelot_vsc7514.c | |
parent | e0c16233577fb8dde90760632df535d7b7846267 (diff) | |
download | linux-4160d9ec5b41738e3a020b5a18cb5e99e2e9244d.tar.xz |
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: 6c30384eb1de ("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>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_vsc7514.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c index b52e24826b10..6b6eb92149ba 100644 --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c +++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c @@ -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, |