summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorWang Hai <wanghai38@huawei.com>2020-07-17 10:50:49 +0800
committerDavid S. Miller <davem@davemloft.net>2020-07-21 18:31:46 -0700
commit1264d7fa3a64d8bea7aebb77253f917947ffda25 (patch)
tree19980c1ed2407dc95d6bee9a31b80660c703d3f9 /drivers/net/ethernet
parent8fdcabeac39824fe67480fd9508d80161c541854 (diff)
downloadlinux-1264d7fa3a64d8bea7aebb77253f917947ffda25.tar.gz
linux-1264d7fa3a64d8bea7aebb77253f917947ffda25.tar.bz2
linux-1264d7fa3a64d8bea7aebb77253f917947ffda25.zip
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: 57878f2f4697 ("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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/socionext/sni_ave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index f2638446b62e..81b554dd7221 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -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);