From: Yufeng Mo Date: Thu, 29 Apr 2021 08:34:51 +0000 (+0800) Subject: net: hns3: initialize the message content in hclge_get_link_mode() X-Git-Tag: accepted/tizen/unified/20230118.172025~7255^2~40^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=568a54bdf70b143f3e0befa298e22ad469ffc732;p=platform%2Fkernel%2Flinux-rpi.git net: hns3: initialize the message content in hclge_get_link_mode() The message sent to VF should be initialized, otherwise random value of some contents may cause improper processing by the target. So add a initialization to message in hclge_get_link_mode(). Fixes: 9194d18b0577 ("net: hns3: fix the problem that the supported port is empty") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index 5512ffe..8e5f9dc 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -533,7 +533,7 @@ static void hclge_get_link_mode(struct hclge_vport *vport, unsigned long advertising; unsigned long supported; unsigned long send_data; - u8 msg_data[10]; + u8 msg_data[10] = {}; u8 dest_vfid; advertising = hdev->hw.mac.advertising[0];