1
0
Fork 0

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: 4bb0432628 ("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>
zero-sugar-mainline-defconfig
Wang Hai 2020-12-03 22:18:06 +08:00 committed by Jakub Kicinski
parent 391119fb5c
commit 82a10dc7f0
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}