diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-22 12:55:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-22 12:55:13 +0100 |
commit | 7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f (patch) | |
tree | dd9c0dac74d0839fd0dd2fd24a59504d5180343a /net/ethtool/rss.c | |
parent | 05e2600cb0a4d73b0779cf29512819616252aeeb (diff) | |
parent | 2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff) |
Merge 6.2-rc5 into tty-next
We need the serial/tty changes into this branch 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; |