Skip to content

Commit befc113

Browse files
Huang Guobindavem330
authored andcommitted
net: ag71xx: add missed clk_disable_unprepare in error path of probe
The ag71xx_mdio_probe() forgets to call clk_disable_unprepare() when of_reset_control_get_exclusive() failed. Add the missed call to fix it. Fixes: d51b6ce ("net: ethernet: add ag71xx driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Huang Guobin <huangguobin4@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ae372cb commit befc113

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/atheros/ag71xx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ static int ag71xx_mdio_probe(struct ag71xx *ag)
556556
ag->mdio_reset = of_reset_control_get_exclusive(np, "mdio");
557557
if (IS_ERR(ag->mdio_reset)) {
558558
netif_err(ag, probe, ndev, "Failed to get reset mdio.\n");
559-
return PTR_ERR(ag->mdio_reset);
559+
err = PTR_ERR(ag->mdio_reset);
560+
goto mdio_err_put_clk;
560561
}
561562

562563
mii_bus->name = "ag71xx_mdio";

0 commit comments

Comments
 (0)