Commit 9534f1e9 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: dsa: lan9303: fix variable 'res' set but not used

Since lan9303_adjust_link() is a void function, there is no option to
return an error. So just remove the variable and lets any errors be
discarded.

Cc: Egil Hjelmeland <privat@egil-hjelmeland.no>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da31735c
...@@ -1042,7 +1042,7 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port, ...@@ -1042,7 +1042,7 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev) struct phy_device *phydev)
{ {
struct lan9303 *chip = ds->priv; struct lan9303 *chip = ds->priv;
int ctl, res; int ctl;
if (!phy_is_pseudo_fixed_link(phydev)) if (!phy_is_pseudo_fixed_link(phydev))
return; return;
...@@ -1063,15 +1063,14 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port, ...@@ -1063,15 +1063,14 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
else else
ctl &= ~BMCR_FULLDPLX; ctl &= ~BMCR_FULLDPLX;
res = lan9303_phy_write(ds, port, MII_BMCR, ctl); lan9303_phy_write(ds, port, MII_BMCR, ctl);
if (port == chip->phy_addr_base) { if (port == chip->phy_addr_base) {
/* Virtual Phy: Remove Turbo 200Mbit mode */ /* Virtual Phy: Remove Turbo 200Mbit mode */
lan9303_read(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, &ctl); lan9303_read(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, &ctl);
ctl &= ~LAN9303_VIRT_SPECIAL_TURBO; ctl &= ~LAN9303_VIRT_SPECIAL_TURBO;
res = regmap_write(chip->regmap, regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, ctl);
LAN9303_VIRT_SPECIAL_CTRL, ctl);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment