mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 19:36:41 +00:00
net:phy:marvell: remove unnecessary code
Compile tested. remove unnecessary code that matches this coccinelle pattern ret = phy_write(x, y , z) if (ret < 0) return ret; return 0; As phy_write returns error code, we dont need to do not need extra check before returning. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8bc47ec6ef
commit
cc90cb3b24
@ -455,11 +455,7 @@ static int m88e1111_config_init(struct phy_device *phydev)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
return phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
}
|
||||
|
||||
static int m88e1118_config_aneg(struct phy_device *phydev)
|
||||
@ -515,11 +511,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
return phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
}
|
||||
|
||||
static int m88e1149_config_init(struct phy_device *phydev)
|
||||
@ -545,11 +537,7 @@ static int m88e1149_config_init(struct phy_device *phydev)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
return phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
}
|
||||
|
||||
static int m88e1145_config_init(struct phy_device *phydev)
|
||||
|
Loading…
Reference in New Issue
Block a user