diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-08-26 05:09:34 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-08-30 12:20:43 +0200 |
commit | 08d1d0e78440aa8670492a01cabea732d4beabf5 (patch) | |
tree | d04819d94053cac1092fe37136fe7bb63a25f98a /net/ethtool/strset.c | |
parent | devlink: use missing attribute ext_ack (diff) | |
download | linux-08d1d0e78440aa8670492a01cabea732d4beabf5.tar.xz linux-08d1d0e78440aa8670492a01cabea732d4beabf5.zip |
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/strset.c')
-rw-r--r-- | net/ethtool/strset.c | 2 |
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]); |