aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2021-06-27 18:45:43 +0000
committerDavid S. Miller <[email protected]>2021-06-28 22:50:21 +0000
commitb74ef9f9cb91fc86c642af965b7598c4df1c9922 (patch)
treed8597b8f7e0ce4274eb49bb39b0eb45c82c9fdb4 /net/unix
parentnet: dsa: sja1105: fix dynamic access to L2 Address Lookup table for SJA1110 (diff)
downloadkernel-b74ef9f9cb91fc86c642af965b7598c4df1c9922.tar.gz
kernel-b74ef9f9cb91fc86c642af965b7598c4df1c9922.zip
net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe()
Clang warns: drivers/net/ethernet/microchip/sparx5/sparx5_main.c:760:29: warning: variable 'mac_addr' is uninitialized when used here [-Wuninitialized] if (of_get_mac_address(np, mac_addr)) { ^~~~~~~~ drivers/net/ethernet/microchip/sparx5/sparx5_main.c:669:14: note: initialize the variable 'mac_addr' to silence this warning u8 *mac_addr; ^ = NULL 1 warning generated. mac_addr is only used to store the value retrieved from of_get_mac_address(), which is then copied into the base_mac member of the sparx5 struct using ether_addr_copy(). It is easier to just use the base_mac address directly, which avoids the warning and the extra copy. Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1413 Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions