diff options
author | Tom Rix <[email protected]> | 2022-03-05 10:13:46 -0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-03-07 12:26:53 +0000 |
commit | 57d29a2935c9aab0aaef6264bf6a58aad3859e7c (patch) | |
tree | 14dd865f56e08c9e7d6aa5ea9c15d841c004cb18 /drivers/fpga/fpga-bridge.c | |
parent | cd5169841c49dab75ecc3b20b3bd1100395b6909 (diff) |
net: rtnetlink: fix error handling in rtnl_fill_statsinfo()
The clang static analyzer reports this issue
rtnetlink.c:5481:2: warning: Undefined or garbage
value returned to caller
return err;
^~~~~~~~~~
There is a function level err variable, in the
list_for_each_entry_rcu block there is a shadow
err. Remove the shadow.
In the same block, the call to nla_nest_start_noflag()
can fail without setting an err. Set the err
to -EMSGSIZE.
Fixes: 216e690631f5 ("net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns")
Signed-off-by: Tom Rix <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions