diff options
author | Wenpeng Liang <liangwenpeng@huawei.com> | 2021-06-16 18:01:19 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-16 12:34:07 -0700 |
commit | 775f25479df924611fc482a602d147a43ac93702 (patch) | |
tree | 4fe073b8cbb419d833db63696177631bcfaa0d85 /drivers/net/phy/et1011c.c | |
parent | 56a967c4f7e5fed2e66d90906ff5956abf69364a (diff) | |
download | linux-stable-775f25479df924611fc482a602d147a43ac93702.tar.gz linux-stable-775f25479df924611fc482a602d147a43ac93702.tar.bz2 linux-stable-775f25479df924611fc482a602d147a43ac93702.zip |
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 <richardcochran@gmail.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/et1011c.c')
-rw-r--r-- | drivers/net/phy/et1011c.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) { |