aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethtool
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2023-02-06 11:49:32 +0200
committerPaolo Abeni <pabeni@redhat.com>2023-02-07 15:39:06 +0100
commitca8e4cbff6d5360efc2ced519c4609e02e88cc59 (patch)
tree17942766f48ce6f0a2549a5ec4eff437f50ff8f9 /net/ethtool
parent15ea59a0e9bf0dce546b6fcab5b00af8b35b870d (diff)
downloadlinux-ca8e4cbff6d5360efc2ced519c4609e02e88cc59.tar.gz
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: 2b30f8291a30 ("net: ethtool: add support for MAC Merge layer") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230206094932.446379-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c
index 7e51f7633001a9..e612856eed8cee 100644
--- a/net/ethtool/mm.c
+++ b/net/ethtool/mm.c
@@ -56,7 +56,7 @@ static int mm_prepare_data(const struct ethnl_req_info *req_base,
out_complete:
ethnl_ops_complete(dev);
- return 0;
+ return ret;
}
static int mm_reply_size(const struct ethnl_req_info *req_base,