提交 92d230dd 编写于 作者: W Wei Yongjun 提交者: David S. Miller

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: e420114e ("rocker: introduce worlds infrastructure")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 44060abe
...@@ -1471,7 +1471,7 @@ static int rocker_world_check_init(struct rocker_port *rocker_port) ...@@ -1471,7 +1471,7 @@ static int rocker_world_check_init(struct rocker_port *rocker_port)
if (rocker->wops) { if (rocker->wops) {
if (rocker->wops->mode != mode) { if (rocker->wops->mode != mode) {
dev_err(&rocker->pdev->dev, "hardware has ports in different worlds, which is not supported\n"); dev_err(&rocker->pdev->dev, "hardware has ports in different worlds, which is not supported\n");
return err; return -EINVAL;
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册