]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix variable may not initialized problem in hns3_init_mac_addr()
authorYonglong Liu <liuyonglong@huawei.com>
Fri, 10 Nov 2023 09:37:11 +0000 (17:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:23 +0000 (16:56 +0000)
commitcfc131b078a36cc9faf718b89bc3627bb4c2b1c7
tree78e5b9b13cf8c4174a22ba478ef6800646b0948c
parent070581829c1aa1db01fb1267857fd718c7a23eda
net: hns3: fix variable may not initialized problem in hns3_init_mac_addr()

[ Upstream commit dbd2f3b20c6ae425665b6975d766e3653d453e73 ]

When a VF is calling hns3_init_mac_addr(), get_mac_addr() may
return fail, then the value of mac_addr_temp is not initialized.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c