Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac0e5496 authored by Shiju Jose's avatar Shiju Jose Committed by David S. Miller
Browse files

net: hns3: Fix for warning uninitialized symbol hw_err_lst3

This patch fixes the smatch warning,

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c:700
hclge_log_and_clear_ppp_error() error: uninitialized symbol
'hw_err_lst3'

Link: https://lkml.org/lkml/2018/10/23/430



Fixes: da2d072a ("net: hns3: Add enable and process hw errors from PPP")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarShiju Jose <shiju.jose@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdaa18f9
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -859,11 +859,13 @@ static int hclge_log_and_clear_ppp_error(struct hclge_dev *hdev, u32 cmd,
		reset_level = HNAE3_FUNC_RESET;
	}

	if (cmd == HCLGE_PPP_CMD0_INT_CMD) {
		err_sts = (le32_to_cpu(desc[0].data[4]) >> 8) & 0x3;
		if (err_sts) {
			hclge_log_error(dev, hw_err_lst3, err_sts);
			reset_level = HNAE3_FUNC_RESET;
		}
	}

	/* clear PPP INT */
	ret = hclge_cmd_clear_error(hdev, &desc[0], NULL, 0,