Skip to contentSkip to conversation

net: mvpp2: Fix error return code in mvpp2_open()

PATCH Applied Wang Hai 3 participants 3 messages Dec 3, 2020

Subsystems (3)
lore
Share & tools
lore

Wang Hai

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -0
index f6616c8933ca..cea886c5bcb5 100644
@@ -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;
 	}
 
Signature · 1 line
2.17.1
maintainer Applied
#2 lore raw
Quoted 9 lines · On Thu, 3 Dec 2020 16:23:46 +0100 Andrew Lunn wrote:
Quoted 6 lines · Wang Hai

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")

Applied, thanks!