diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-08-29 14:37:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-01 10:00:42 -0700 |
commit | ba3d0dda6d5facd6fe63a3276825bd2b9fa2990e (patch) | |
tree | 60c67b3391caab984573e71a86ac98b8bebc49ae /Documentation | |
parent | 53700f0c9ac36000d35d1fd3645d1607b5c45fac (diff) |
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: 03377e381bf4 ("drivers: net: xgene: Fix backward compatibility")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions