From: Yonglong Liu liuyonglong@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
----------------------------
If the parameter is not valid in hclge_get_dfx_reg(), the ret is used but not initialized.
Signed-off-by: Yonglong Liu liuyonglong@huawei.com Reviewed-by: li yongxin liyongxin1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index f4f9ce0ca1763..9e5b6c91bd369 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -11217,6 +11217,7 @@ static int hclge_get_dfx_reg(struct hclge_dev *hdev, void *data) dev_err(&hdev->pdev->dev, "Get dfx reg fail, invalid bd number: %d\n", bd_num_max); + ret = -EINVAL; goto out; }