net: dsa: qca8k: check the correct variable in qca8k_set_mac_eee()
This code check "reg" but "ret" was intended so the error handling will
never trigger.
Fixes: 7c9896e378
("net: dsa: qca8k: check return value of read functions correctly")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
aa3d020b22
commit
3d0167f2a6
@ -1454,10 +1454,8 @@ qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
|
||||
|
||||
mutex_lock(&priv->reg_mutex);
|
||||
ret = qca8k_read(priv, QCA8K_REG_EEE_CTRL, ®);
|
||||
if (reg < 0) {
|
||||
ret = reg;
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (eee->eee_enabled)
|
||||
reg |= lpi_en;
|
||||
|
Loading…
Reference in New Issue
Block a user