Commit 535f366f authored by Wang Hai's avatar Wang Hai Committed by Greg Kroah-Hartman

net: ethernet: ave: Fix error returns in ave_init

[ Upstream commit 1264d7fa ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8a330ede
...@@ -1196,7 +1196,7 @@ static int ave_init(struct net_device *ndev) ...@@ -1196,7 +1196,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