lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.7 086/179] net: ethernet: ave: Fix error returns in ave_init
    Date
    From: Wang Hai <wanghai38@huawei.com>

    [ Upstream commit 1264d7fa3a64d8bea7aebb77253f917947ffda25 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/socionext/sni_ave.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
    index 67ddf782d98a5..897c895629d03 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);

    --
    2.25.1


    \
     
     \ /
      Last update: 2020-07-27 16:29    [W:7.215 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site