summaryrefslogtreecommitdiff
path: root/net/ethtool
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-08-25 20:09:34 -0700
committerPaolo Abeni <pabeni@redhat.com>2022-08-30 12:20:43 +0200
commit08d1d0e78440aa8670492a01cabea732d4beabf5 (patch)
treed04819d94053cac1092fe37136fe7bb63a25f98a /net/ethtool
parent1f7633b58facf399eee0b049ed6b6d89b8beeba5 (diff)
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>
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/strset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
index 2d51b7ab4dc5..3f7de54d85fb 100644
--- a/net/ethtool/strset.c
+++ b/net/ethtool/strset.c
@@ -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]);