[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201203141806.37966-1-wanghai38@huawei.com>
Date: Thu, 3 Dec 2020 22:18:06 +0800
From: Wang Hai <wanghai38@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>,
<rmk+kernel@...linux.org.uk>, <mcroce@...rosoft.com>,
<sven.auhagen@...eatech.de>, <andrew@...n.ch>, <atenart@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net] 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@...wei.com>
Signed-off-by: Wang Hai <wanghai38@...wei.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.17.1
Powered by blists - more mailing lists