Skip to content

Commit 1264d7f

Browse files
Wang Haidavem330
authored andcommitted
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: 57878f2 ("net: ethernet: ave: add support for phy-mode setting of system controller") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wang Hai <[email protected]> Reviewed-by: Kunihiko Hayashi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8fdcabe commit 1264d7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/socionext/sni_ave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev)
11911191
ret = regmap_update_bits(priv->regmap, SG_ETPINMODE,
11921192
priv->pinmode_mask, priv->pinmode_val);
11931193
if (ret)
1194-
return ret;
1194+
goto out_reset_assert;
11951195

11961196
ave_global_reset(ndev);
11971197

0 commit comments

Comments
 (0)