Searched hist:"030 c8198" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
H A D | hclge_debugfs.c | 030c8198 Fri May 21 05:01:46 CDT 2021 Colin Ian King <colin.king@canonical.com> 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>
|