mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 02:46:48 +07:00
ba3d0dda6d
A bugfix for backward compatibility handling introduced undefined
behavior for the case that of_parse_phandle() does not return
a valid entry, as "gcc -Wmaybe-unused" reports:
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_phy_connect':
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_mdio_config':
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
We can work around this by removing the check for zero "np", as
of_phy_connect() will correctly handle a NULL argument so we fall
back into the normal error handling case.
Note that I had previously fixed another bug that resulted in the
exact same warning, but this is a different problem that was
introduced after my original fix.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
xgene_enet_cle.c | ||
xgene_enet_cle.h | ||
xgene_enet_ethtool.c | ||
xgene_enet_hw.c | ||
xgene_enet_hw.h | ||
xgene_enet_main.c | ||
xgene_enet_main.h | ||
xgene_enet_ring2.c | ||
xgene_enet_ring2.h | ||
xgene_enet_sgmac.c | ||
xgene_enet_sgmac.h | ||
xgene_enet_xgmac.c | ||
xgene_enet_xgmac.h |