Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ int stmmac_mdio_idle(struct mii_bus *bus)
if (IS_ERR(reset_gpio))
return PTR_ERR(reset_gpio);

devm_gpiod_put(priv->device, reset_gpio);
if (reset_gpio)
devm_gpiod_put(priv->device, reset_gpio);
}
#endif
#endif
Expand Down Expand Up @@ -405,7 +406,8 @@ int stmmac_mdio_reset(struct mii_bus *bus)
msleep(DIV_ROUND_UP(delays[2], 1000));

/* put reset gpio resource for next time */
devm_gpiod_put(priv->device, reset_gpio);
if (reset_gpio)
devm_gpiod_put(priv->device, reset_gpio);
}
#endif

Expand Down