aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-07-05 22:55:55 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-05 15:48:19 -0700
commit9534f1e9084452afb3f8bc0fcdb81a95a6b8392a (patch)
tree43b9b2b8f753e870a5ad5899c0b969bce8dba5a9 /drivers/net/dsa
parentnet: dsa: rtl8366: Pass GENMASK() signed bits (diff)
downloadwireguard-linux-9534f1e9084452afb3f8bc0fcdb81a95a6b8392a.tar.xz
wireguard-linux-9534f1e9084452afb3f8bc0fcdb81a95a6b8392a.zip
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: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/lan9303-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index cc17a44dd3a8..aa1142d6a9f5 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1042,7 +1042,7 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev)
{
struct lan9303 *chip = ds->priv;
- int ctl, res;
+ int ctl;
if (!phy_is_pseudo_fixed_link(phydev))
return;
@@ -1063,15 +1063,14 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
else
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) {
/* Virtual Phy: Remove Turbo 200Mbit mode */
lan9303_read(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, &ctl);
ctl &= ~LAN9303_VIRT_SPECIAL_TURBO;
- res = regmap_write(chip->regmap,
- LAN9303_VIRT_SPECIAL_CTRL, ctl);
+ regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, ctl);
}
}