* [PATCH] net: ethernet: ave: Fix error returns in ave_init
@ 2020-07-17 2:50 Wang Hai
2020-07-17 4:16 ` Kunihiko Hayashi
2020-07-22 1:32 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Wang Hai @ 2020-07-17 2:50 UTC (permalink / raw)
To: hayashi.kunihiko, davem, kuba, p.zabel, yamada.masahiro
Cc: netdev, linux-kernel, wanghai38
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>
---
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 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);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: ave: Fix error returns in ave_init
2020-07-17 2:50 [PATCH] net: ethernet: ave: Fix error returns in ave_init Wang Hai
@ 2020-07-17 4:16 ` Kunihiko Hayashi
2020-07-22 1:32 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Kunihiko Hayashi @ 2020-07-17 4:16 UTC (permalink / raw)
To: Wang Hai; +Cc: davem, kuba, p.zabel, yamada.masahiro, netdev, linux-kernel
Hi Wang,
On 2020/07/17 11:50, Wang Hai wrote:
> 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>
> ---
> 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 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);
>
>
Thank you for pointing out.
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
Best Regards
Kunihiko Hayashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: ethernet: ave: Fix error returns in ave_init
2020-07-17 2:50 [PATCH] net: ethernet: ave: Fix error returns in ave_init Wang Hai
2020-07-17 4:16 ` Kunihiko Hayashi
@ 2020-07-22 1:32 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-07-22 1:32 UTC (permalink / raw)
To: wanghai38
Cc: hayashi.kunihiko, kuba, p.zabel, yamada.masahiro, netdev, linux-kernel
From: Wang Hai <wanghai38@huawei.com>
Date: Fri, 17 Jul 2020 10:50:49 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-22 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 2:50 [PATCH] net: ethernet: ave: Fix error returns in ave_init Wang Hai
2020-07-17 4:16 ` Kunihiko Hayashi
2020-07-22 1:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).