diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-08-26 06:09:34 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-08-30 13:20:43 +0300 |
commit | 08d1d0e78440aa8670492a01cabea732d4beabf5 (patch) | |
tree | d04819d94053cac1092fe37136fe7bb63a25f98a /net | |
parent | 1f7633b58facf399eee0b049ed6b6d89b8beeba5 (diff) | |
download | linux-08d1d0e78440aa8670492a01cabea732d4beabf5.tar.xz |
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')
-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]); |