mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 01:17:30 +01:00
realtek: ethernet: avoid using unitialized memory
The mac_addr variable was not zero-initialized, causing weird side effects when the memory contents were a valid MAC address. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Link: https://github.com/openwrt/openwrt/pull/21504 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
a91c3abe83
commit
19b8d391a9
1 changed files with 1 additions and 1 deletions
|
|
@ -1655,7 +1655,7 @@ static int rtl838x_eth_probe(struct platform_device *pdev)
|
|||
const struct rteth_config *matchdata;
|
||||
phy_interface_t phy_mode;
|
||||
struct phylink *phylink;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
u8 mac_addr[ETH_ALEN] = {0};
|
||||
int err = 0, rxrings, rxringlen;
|
||||
struct ring_b *ring;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue