Skip to content

Commit

Permalink
net: ethernet: ave: Fix error returns in ave_init
Browse files Browse the repository at this point in the history
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: 57878f2 ("net: ethernet: ave: add support for phy-mode setting of system controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wang Hai authored and David S. Miller committed Jul 22, 2020
1 parent 8fdcabe commit 1264d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/socionext/sni_ave.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev)
ret = regmap_update_bits(priv->regmap, SG_ETPINMODE,
priv->pinmode_mask, priv->pinmode_val);
if (ret)
return ret;
goto out_reset_assert;

ave_global_reset(ndev);

Expand Down

0 comments on commit 1264d7f

Please sign in to comment.