aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/sja1105/sja1105_ethtool.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-05-21 11:01:46 +0100
committerDavid S. Miller <davem@davemloft.net>2021-05-21 13:56:18 -0700
commit030c8198d744e4149da57bd2a73b87aa6a8aa272 (patch)
treee5baa8a45325e4326aeaff152ec6adc3368f606f /drivers/net/dsa/sja1105/sja1105_ethtool.c
parentatm: Fix typo (diff)
downloadlinux-dev-030c8198d744e4149da57bd2a73b87aa6a8aa272.tar.xz
linux-dev-030c8198d744e4149da57bd2a73b87aa6a8aa272.zip
net: hns3: Fix return of uninitialized variable ret
In the unlikely event that rule_cnt is zero the variable ret is not assigned a value and function hclge_dbg_dump_fd_tcam can end up returning an unitialized value in ret. Fix this by explicitly setting ret to zero before the for-loop. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: b5a0b70d77b9 ("net: hns3: refactor dump fd tcam of debugfs") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_ethtool.c')
0 files changed, 0 insertions, 0 deletions