Commit ac9c41d5 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

ethtool: potential NULL dereference in strset_prepare_data()

Smatch complains that the NULL checking isn't done consistently:

    net/ethtool/strset.c:253 strset_prepare_data()
    error: we previously assumed 'dev' could be null (see line 233)

It looks like there is a missing return on this path.

Fixes: 71921690 ("ethtool: provide string sets with STRSET_GET request")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMichal Kubecek <mkubecek@suse.cz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d97772db
......@@ -239,6 +239,7 @@ static int strset_prepare_data(const struct ethnl_req_info *req_base,
return -EINVAL;
}
}
return 0;
}
ret = ethnl_ops_begin(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment