All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe()
@ 2022-05-15 17:01 Christophe JAILLET
  2022-05-15 21:16 ` Florian Fainelli
  2022-05-17  9:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-05-15 17:01 UTC (permalink / raw)
  To: Florian Fainelli, Broadcom internal kernel review list,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev

if devm_clk_get_optional() fails, we still need to go through the error
handling path.

Add the missing goto.

Fixes: 6328a126896ea ("net: systemport: Manage Wake-on-LAN clock")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index f1805fb857c5..47fc8e6963d5 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -2581,8 +2581,10 @@ static int bcm_sysport_probe(struct platform_device *pdev)
 		device_set_wakeup_capable(&pdev->dev, 1);
 
 	priv->wol_clk = devm_clk_get_optional(&pdev->dev, "sw_sysportwol");
-	if (IS_ERR(priv->wol_clk))
-		return PTR_ERR(priv->wol_clk);
+	if (IS_ERR(priv->wol_clk)) {
+		ret = PTR_ERR(priv->wol_clk);
+		goto err_deregister_fixed_link;
+	}
 
 	/* Set the needed headroom once and for all */
 	BUILD_BUG_ON(sizeof(struct bcm_tsb) != 8);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe()
  2022-05-15 17:01 [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe() Christophe JAILLET
@ 2022-05-15 21:16 ` Florian Fainelli
  2022-05-17  9:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-05-15 21:16 UTC (permalink / raw)
  To: Christophe JAILLET, Florian Fainelli,
	Broadcom internal kernel review list, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-kernel, kernel-janitors, netdev



On 5/15/2022 10:01 AM, Christophe JAILLET wrote:
> if devm_clk_get_optional() fails, we still need to go through the error
> handling path.
> 
> Add the missing goto.
> 
> Fixes: 6328a126896ea ("net: systemport: Manage Wake-on-LAN clock")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe()
  2022-05-15 17:01 [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe() Christophe JAILLET
  2022-05-15 21:16 ` Florian Fainelli
@ 2022-05-17  9:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-17  9:00 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: f.fainelli, bcm-kernel-feedback-list, davem, edumazet, kuba,
	pabeni, linux-kernel, kernel-janitors, netdev

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sun, 15 May 2022 19:01:56 +0200 you wrote:
> if devm_clk_get_optional() fails, we still need to go through the error
> handling path.
> 
> Add the missing goto.
> 
> Fixes: 6328a126896ea ("net: systemport: Manage Wake-on-LAN clock")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> [...]

Here is the summary with links:
  - net: systemport: Fix an error handling path in bcm_sysport_probe()
    https://git.kernel.org/netdev/net/c/ef6b1cd11962

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-17  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 17:01 [PATCH] net: systemport: Fix an error handling path in bcm_sysport_probe() Christophe JAILLET
2022-05-15 21:16 ` Florian Fainelli
2022-05-17  9:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.