Commit 1264d7fa authored by Wang Hai's avatar Wang Hai Committed by David S. Miller

net: ethernet: ave: Fix error returns in ave_init

When regmap_update_bits failed in ave_init(), calls of the functions
reset_control_assert() and clk_disable_unprepare() were missed.
Add goto out_reset_assert to do this.

Fixes: 57878f2f ("net: ethernet: ave: add support for phy-mode setting of system controller")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Reviewed-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8fdcabea
...@@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev) ...@@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev)
ret = regmap_update_bits(priv->regmap, SG_ETPINMODE, ret = regmap_update_bits(priv->regmap, SG_ETPINMODE,
priv->pinmode_mask, priv->pinmode_val); priv->pinmode_mask, priv->pinmode_val);
if (ret) if (ret)
return ret; goto out_reset_assert;
ave_global_reset(ndev); ave_global_reset(ndev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment