* [PATCH net] net: mvpp2: Fix error return code in mvpp2_open()
@ 2020-12-03 14:18 Wang Hai
2020-12-03 15:23 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Wang Hai @ 2020-12-03 14:18 UTC (permalink / raw)
To: davem, kuba, rmk+kernel, mcroce, sven.auhagen, andrew, atenart
Cc: netdev, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: mvpp2: Fix error return code in mvpp2_open()
2020-12-03 14:18 [PATCH net] net: mvpp2: Fix error return code in mvpp2_open() Wang Hai
@ 2020-12-03 15:23 ` Andrew Lunn
2020-12-03 18:59 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2020-12-03 15:23 UTC (permalink / raw)
To: Wang Hai
Cc: davem, kuba, rmk+kernel, mcroce, sven.auhagen, atenart, netdev,
linux-kernel
On Thu, Dec 03, 2020 at 10:18:06PM +0800, Wang Hai wrote:
> 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>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: mvpp2: Fix error return code in mvpp2_open()
2020-12-03 15:23 ` Andrew Lunn
@ 2020-12-03 18:59 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-12-03 18:59 UTC (permalink / raw)
To: Andrew Lunn
Cc: Wang Hai, davem, rmk+kernel, mcroce, sven.auhagen, atenart,
netdev, linux-kernel
On Thu, 3 Dec 2020 16:23:46 +0100 Andrew Lunn wrote:
> On Thu, Dec 03, 2020 at 10:18:06PM +0800, Wang Hai wrote:
> > 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>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-03 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-03 14:18 [PATCH net] net: mvpp2: Fix error return code in mvpp2_open() Wang Hai
2020-12-03 15:23 ` Andrew Lunn
2020-12-03 18:59 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox