diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-07-31 01:00:51 +0300 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2019-09-04 19:37:19 +0300 |
commit | 9bbff5478e7b9e66b25da59da85e88924b79eb2e (patch) | |
tree | 74af7494a659bbb62d057b57be19e835dde5c237 /drivers | |
parent | fd6d88f55baee946d2a1bd16e7344486cf140c94 (diff) | |
download | u-boot-9bbff5478e7b9e66b25da59da85e88924b79eb2e.tar.xz |
drivers: net: pfe_eth: undefined return value
Do not use random value from stack as return value of pfe_phy_write().
Indicated by cppcheck.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/pfe_eth/pfe_mdio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c index 2dde9e7ac8..62309670fa 100644 --- a/drivers/net/pfe_eth/pfe_mdio.c +++ b/drivers/net/pfe_eth/pfe_mdio.c @@ -110,7 +110,6 @@ static int pfe_phy_write(struct mii_dev *bus, int phy_addr, int dev_addr, u32 phy; u32 reg_data; int timeout = MDIO_TIMEOUT; - int val; if (dev_addr == MDIO_DEVAD_NONE) { reg = ((reg_addr & EMAC_MII_DATA_RA_MASK) << @@ -150,7 +149,7 @@ static int pfe_phy_write(struct mii_dev *bus, int phy_addr, int dev_addr, debug("%s: phy: %02x reg:%02x val:%#x\n", __func__, phy_addr, reg_addr, data); - return val; + return 0; } static void pfe_configure_serdes(struct pfe_eth_dev *priv) |