diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-12-03 17:18:06 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-03 21:57:24 +0300 |
commit | 82a10dc7f0960735f40e8d7d3bee56934291600f (patch) | |
tree | 08fc1ca4bb0e454d5dd7559e5e362b4cb9136764 /drivers | |
parent | 391119fb5c5c4bdb4d57c7ffeb5e8d18560783d1 (diff) | |
download | linux-82a10dc7f0960735f40e8d7d3bee56934291600f.tar.xz |
net: mvpp2: Fix error return code in mvpp2_open()
Fix to return negative error code -ENOENT from invalid configuration
error handling case instead of 0, as done elsewhere in this function.
Fixes: 4bb043262878 ("net: mvpp2: phylink support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201203141806.37966-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index f6616c8933ca..cea886c5bcb5 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4426,6 +4426,7 @@ static int mvpp2_open(struct net_device *dev) if (!valid) { netdev_err(port->dev, "invalid configuration: no dt or link IRQ"); + err = -ENOENT; goto err_free_irq; } |