mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack
Strset needs ETHTOOL_A_STRINGSET_ID, use it as an example of reporting attrs missing in nests. Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
1f7633b58f
commit
08d1d0e784
@ -167,7 +167,7 @@ static int strset_get_id(const struct nlattr *nest, u32 *val,
|
||||
get_stringset_policy, extack);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (!tb[ETHTOOL_A_STRINGSET_ID])
|
||||
if (NL_REQ_ATTR_CHECK(extack, nest, tb, ETHTOOL_A_STRINGSET_ID))
|
||||
return -EINVAL;
|
||||
|
||||
*val = nla_get_u32(tb[ETHTOOL_A_STRINGSET_ID]);
|
||||
|
Loading…
Reference in New Issue
Block a user