提交 ca8e4cbf 编写于 作者: V Vladimir Oltean 提交者: Paolo Abeni

ethtool: mm: fix get_mm() return code not propagating to user space

If ops->get_mm() returns a non-zero error code, we goto out_complete,
but there, we return 0. Fix that to propagate the "ret" variable to the
caller. If ops->get_mm() succeeds, it will always return 0.

Fixes: 2b30f829 ("net: ethtool: add support for MAC Merge layer")
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230206094932.446379-1-vladimir.oltean@nxp.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 15ea59a0
...@@ -56,7 +56,7 @@ static int mm_prepare_data(const struct ethnl_req_info *req_base, ...@@ -56,7 +56,7 @@ static int mm_prepare_data(const struct ethnl_req_info *req_base,
out_complete: out_complete:
ethnl_ops_complete(dev); ethnl_ops_complete(dev);
return 0; return ret;
} }
static int mm_reply_size(const struct ethnl_req_info *req_base, static int mm_reply_size(const struct ethnl_req_info *req_base,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册