diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-09-05 12:49:37 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-09-09 17:17:39 -0700 |
commit | 40f111cc6e1b35562e815170d8f7efb49bf0fb21 (patch) | |
tree | 9a167cdd8707573105a14480591c990f1400a59f /drivers/net/ethernet/atheros | |
parent | bfff5d8e211189396c8f9841d0b027f13452b162 (diff) |
net: ag71xx: remove always true branch
The opposite of this condition is checked above and if true, function
returns. Which means this can never be false.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20240905194938.8453-7-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/ag71xx.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index a32a72fa4179..e28a4b018b11 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -719,12 +719,10 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) mii_bus->parent = dev; snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s.%d", np->name, ag->mac_idx); - if (!IS_ERR(mdio_reset)) { - reset_control_assert(mdio_reset); - msleep(100); - reset_control_deassert(mdio_reset); - msleep(200); - } + reset_control_assert(mdio_reset); + msleep(100); + reset_control_deassert(mdio_reset); + msleep(200); mnp = of_get_child_by_name(np, "mdio"); err = devm_of_mdiobus_register(dev, mii_bus, mnp); |