From 775f25479df924611fc482a602d147a43ac93702 Mon Sep 17 00:00:00 2001 From: Wenpeng Liang Date: Wed, 16 Jun 2021 18:01:19 +0800 Subject: net: phy: change format of some declarations Add a blank line after declarations, change the order of them and put the assignments and declarations together. Cc: Richard Cochran Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/phy/et1011c.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/net/phy/et1011c.c') diff --git a/drivers/net/phy/et1011c.c b/drivers/net/phy/et1011c.c index 09e07b902d3a..07bb484ba402 100644 --- a/drivers/net/phy/et1011c.c +++ b/drivers/net/phy/et1011c.c @@ -46,8 +46,8 @@ MODULE_LICENSE("GPL"); static int et1011c_config_aneg(struct phy_device *phydev) { - int ctl = 0; - ctl = phy_read(phydev, MII_BMCR); + int ctl = phy_read(phydev, MII_BMCR); + if (ctl < 0) return ctl; ctl &= ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_SPEED1000 | @@ -60,9 +60,10 @@ static int et1011c_config_aneg(struct phy_device *phydev) static int et1011c_read_status(struct phy_device *phydev) { + static int speed; int ret; u32 val; - static int speed; + ret = genphy_read_status(phydev); if (speed != phydev->speed) { -- cgit v1.2.3