diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-22 10:37:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-22 10:37:23 +0300 |
commit | 99ba2ad1db623df79456b8556b3f4900f394c8c2 (patch) | |
tree | 2bf6a20de87f0a5b944fd69d53723fc4710d7b7e /net/ethtool/rss.c | |
parent | 18e126e97c961f7a93823795c879d7c085fe5098 (diff) | |
parent | 2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff) | |
download | linux-99ba2ad1db623df79456b8556b3f4900f394c8c2.tar.xz |
Merge 6.2-rc5 into char-misc-next
We need the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ethtool/rss.c')
-rw-r--r-- | net/ethtool/rss.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ethtool/rss.c b/net/ethtool/rss.c index ebe6145aed3f..be260ab34e58 100644 --- a/net/ethtool/rss.c +++ b/net/ethtool/rss.c @@ -122,10 +122,13 @@ rss_fill_reply(struct sk_buff *skb, const struct ethnl_req_info *req_base, { const struct rss_reply_data *data = RSS_REPDATA(reply_base); - if (nla_put_u32(skb, ETHTOOL_A_RSS_HFUNC, data->hfunc) || - nla_put(skb, ETHTOOL_A_RSS_INDIR, - sizeof(u32) * data->indir_size, data->indir_table) || - nla_put(skb, ETHTOOL_A_RSS_HKEY, data->hkey_size, data->hkey)) + if ((data->hfunc && + nla_put_u32(skb, ETHTOOL_A_RSS_HFUNC, data->hfunc)) || + (data->indir_size && + nla_put(skb, ETHTOOL_A_RSS_INDIR, + sizeof(u32) * data->indir_size, data->indir_table)) || + (data->hkey_size && + nla_put(skb, ETHTOOL_A_RSS_HKEY, data->hkey_size, data->hkey))) return -EMSGSIZE; return 0; |