Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bc47ec6 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by David S. Miller
Browse files

net:phy:davicom: 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: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a25cc43e
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -134,12 +134,7 @@ static int dm9161_config_init(struct phy_device *phydev)
		return err;
		return err;


	/* Reconnect the PHY, and enable Autonegotiation */
	/* Reconnect the PHY, and enable Autonegotiation */
	err = phy_write(phydev, MII_BMCR, BMCR_ANENABLE);
	return phy_write(phydev, MII_BMCR, BMCR_ANENABLE);

	if (err < 0)
		return err;

	return 0;
}
}


static int dm9161_ack_interrupt(struct phy_device *phydev)
static int dm9161_ack_interrupt(struct phy_device *phydev)