All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rocker: fix error return code in rocker_world_check_init()
@ 2016-10-22 14:31 Wei Yongjun
  2016-10-22 15:34 ` Jiri Pirko
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2016-10-22 14:31 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return error code -EINVAL from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/rocker/rocker_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 2e81b70..0f3265b 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -1471,7 +1471,7 @@ static int rocker_world_check_init(struct rocker_port *rocker_port)
 	if (rocker->wops) {
 		if (rocker->wops->mode != mode) {
 			dev_err(&rocker->pdev->dev, "hardware has ports in different worlds, which is not supported\n");
-			return err;
+			return -EINVAL;
 		}
 		return 0;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] rocker: fix error return code in rocker_world_check_init()
  2016-10-22 14:31 [PATCH -next] rocker: fix error return code in rocker_world_check_init() Wei Yongjun
@ 2016-10-22 15:34 ` Jiri Pirko
  2016-10-26 21:21   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2016-10-22 15:34 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Wei Yongjun, netdev, davem

Sat, Oct 22, 2016 at 04:31:06PM CEST, weiyj.lk@gmail.com wrote:
>From: Wei Yongjun <weiyongjun1@huawei.com>
>
>Fix to return error code -EINVAL from the error handling
>case instead of 0, as done elsewhere in this function.
>
>Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Fixes: e420114eef4a ("rocker: introduce worlds infrastructure")
Acked-by: Jiri Pirko <jiri@mellanox.com>

Dave, you can queue this to -net.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] rocker: fix error return code in rocker_world_check_init()
  2016-10-22 15:34 ` Jiri Pirko
@ 2016-10-26 21:21   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2016-10-26 21:21 UTC (permalink / raw)
  To: jiri; +Cc: weiyj.lk, weiyongjun1, netdev

From: Jiri Pirko <jiri@resnulli.us>
Date: Sat, 22 Oct 2016 17:34:29 +0200

> Sat, Oct 22, 2016 at 04:31:06PM CEST, weiyj.lk@gmail.com wrote:
>>From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>>Fix to return error code -EINVAL from the error handling
>>case instead of 0, as done elsewhere in this function.
>>
>>Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fixes: e420114eef4a ("rocker: introduce worlds infrastructure")
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> 
> Dave, you can queue this to -net.

Done, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-26 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22 14:31 [PATCH -next] rocker: fix error return code in rocker_world_check_init() Wei Yongjun
2016-10-22 15:34 ` Jiri Pirko
2016-10-26 21:21   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.