]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: clean up a return in hclge_tm_bp_setup()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Oct 2020 11:22:12 +0000 (14:22 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Oct 2020 23:16:23 +0000 (16:16 -0700)
commitdae0e4207b3762cbf3f3dd3f7bb6451099a5d7b9
tree7dda26c9d71eefed07ab0ba18645595205f458d6
parent5eb07a153fca1ee8b9452643863198dfd5fef755
net: hns3: clean up a return in hclge_tm_bp_setup()

Smatch complains that "ret" might be uninitialized if we don't enter
the loop.  We do always enter the loop so it's a false positive, but
it's cleaner to just return a literal zero and that silences the
warning as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201023112212.GA282278@mwanda
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c