diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-10-22 17:31:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-27 00:20:36 +0300 |
commit | 92d230dd8cafac417e130e404d4b64eafe2271de (patch) | |
tree | da6fcd23e2997a258665b22247852be29fb0ef01 /drivers | |
parent | 44060abe1dd609d5efa641cce3784777ff5d507f (diff) | |
download | linux-92d230dd8cafac417e130e404d4b64eafe2271de.tar.xz |
rocker: fix error return code in rocker_world_check_init()
Fix to return error code -EINVAL from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: e420114eef4a ("rocker: introduce worlds infrastructure")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/rocker/rocker_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index 5424fb341613..24b746406bc7 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; } |