net: remove conditional return with no effect

Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260725150852.859188-4-ekffu200098@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Sang-Heon Jeon
2026-07-26 00:08:51 +09:00
committed by Paolo Abeni
parent 66084e9510
commit cd833378ba
2 changed files with 2 additions and 10 deletions

View File

@@ -1028,11 +1028,7 @@ static int lan87xx_read_status(struct phy_device *phydev)
if (rc < 0)
return rc;
rc = genphy_read_status_fixed(phydev);
if (rc < 0)
return rc;
return rc;
return genphy_read_status_fixed(phydev);
}
static int lan87xx_config_aneg(struct phy_device *phydev)

View File

@@ -1520,11 +1520,7 @@ static int tps23881_i2c_probe(struct i2c_client *client)
"failed to register PSE controller\n");
}
ret = tps23881_setup_irq(priv, client->irq);
if (ret)
return ret;
return ret;
return tps23881_setup_irq(priv, client->irq);
}
static const struct i2c_device_id tps23881_id[] = {