linux_dsm_epyc7002/drivers/net/ethernet/apm/xgene
Arnd Bergmann ba3d0dda6d net: xgene: fix backward compatibility fix
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: 03377e381b ("drivers: net: xgene: Fix backward compatibility")
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-01 10:00:42 -07:00
..
Kconfig drivers: net: xgene: Poll link status via GPIO 2016-08-13 11:48:53 -07:00
Makefile drivers: net: xgene: Add support for Classifier engine 2016-02-17 22:08:34 -05:00
xgene_enet_cle.c drivers: net: xgene: Fix RSS indirection table fields 2016-08-13 11:48:52 -07:00
xgene_enet_cle.h drivers: net: xgene: Fix RSS indirection table fields 2016-08-13 11:48:52 -07:00
xgene_enet_ethtool.c drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset 2016-07-25 21:51:43 -07:00
xgene_enet_hw.c net: xgene: fix backward compatibility fix 2016-09-01 10:00:42 -07:00
xgene_enet_hw.h drivers: net: xgene: XFI PCS reset when link is down 2016-08-13 11:48:53 -07:00
xgene_enet_main.c drivers: net: xgene: Poll link status via GPIO 2016-08-13 11:48:53 -07:00
xgene_enet_main.h drivers: net: xgene: Poll link status via GPIO 2016-08-13 11:48:53 -07:00
xgene_enet_ring2.c drivers: net: xgene: Add support for multiple queues 2016-02-17 22:08:34 -05:00
xgene_enet_ring2.h drivers: net: xgene: Add ring manager v2 functions 2015-04-30 16:03:13 -04:00
xgene_enet_sgmac.c drivers: net: xgene: Add backward compatibility 2016-07-25 21:51:43 -07:00
xgene_enet_sgmac.h drivers: net: xgene: Fix module unload crash - clkrst sequence 2016-07-25 21:51:43 -07:00
xgene_enet_xgmac.c net/xgene: fix error handling during reset 2016-08-29 00:29:46 -04:00
xgene_enet_xgmac.h drivers: net: xgene: XFI PCS reset when link is down 2016-08-13 11:48:53 -07:00