diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-01-05 01:21:52 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-05 01:27:58 +0100 |
commit | e62a768f55ce8df1d092b5d93357dcc0894d8060 (patch) | |
tree | 87814ce767cf08427044f2a48b0ce1ad04632877 /drivers/net/phy/phy_device.c | |
parent | <linux/phy.h>: coding style fixes (diff) | |
download | linux-e62a768f55ce8df1d092b5d93357dcc0894d8060.tar.xz linux-e62a768f55ce8df1d092b5d93357dcc0894d8060.zip |
phy: kill useless local variables
A number of functions (especially in phy.c) has local variables that were hardly
needed in the first place -- remove them.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 5f9ee61a4ab5..c5100aa5e9ad 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -327,7 +327,6 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id, struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) { struct phy_c45_device_ids c45_ids = {0}; - struct phy_device *dev = NULL; u32 phy_id = 0; int r; @@ -339,9 +338,7 @@ struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) if ((phy_id & 0x1fffffff) == 0x1fffffff) return NULL; - dev = phy_device_create(bus, addr, phy_id, is_c45, &c45_ids); - - return dev; + return phy_device_create(bus, addr, phy_id, is_c45, &c45_ids); } EXPORT_SYMBOL(get_phy_device); @@ -781,7 +778,6 @@ static int genphy_config_advert(struct phy_device *phydev) */ int genphy_setup_forced(struct phy_device *phydev) { - int err; int ctl = 0; phydev->pause = 0; @@ -795,9 +791,7 @@ int genphy_setup_forced(struct phy_device *phydev) if (DUPLEX_FULL == phydev->duplex) ctl |= BMCR_FULLDPLX; - err = phy_write(phydev, MII_BMCR, ctl); - - return err; + return phy_write(phydev, MII_BMCR, ctl); } EXPORT_SYMBOL(genphy_setup_forced); |