]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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)
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

index 15f69fa863236cb838397dc7d3d2d107f8b890c2..e8495f58a1a8e81fa4dbdc86b998984fea437434 100644 (file)
@@ -1373,7 +1373,7 @@ static int hclge_tm_bp_setup(struct hclge_dev *hdev)
                        return ret;
        }
 
-       return ret;
+       return 0;
 }
 
 int hclge_pause_setup_hw(struct hclge_dev *hdev, bool init)