Skip to content

Commit

Permalink
net: hns3: initialize the message content in hclge_get_link_mode()
Browse files Browse the repository at this point in the history
[ Upstream commit 568a54b ]

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: 9194d18 ("net: hns3: fix the problem that the supported port is empty")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yufeng Mo authored and gregkh committed May 19, 2021
1 parent 4c2b7a0 commit a81a61e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,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];
Expand Down

0 comments on commit a81a61e

Please sign in to comment.