Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit ef6b1cd

Browse files
tititiou36Paolo Abeni
authored and
Paolo Abeni
committed
net: systemport: Fix an error handling path in bcm_sysport_probe()
if devm_clk_get_optional() fails, we still need to go through the error handling path. Add the missing goto. Fixes: 6328a12 ("net: systemport: Manage Wake-on-LAN clock") Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/99d70634a81c229885ae9e4ee69b2035749f7edc.1652634040.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni <[email protected]>
1 parent af8ca6e commit ef6b1cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/broadcom/bcmsysport.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -2585,8 +2585,10 @@ static int bcm_sysport_probe(struct platform_device *pdev)
25852585
device_set_wakeup_capable(&pdev->dev, 1);
25862586

25872587
priv->wol_clk = devm_clk_get_optional(&pdev->dev, "sw_sysportwol");
2588-
if (IS_ERR(priv->wol_clk))
2589-
return PTR_ERR(priv->wol_clk);
2588+
if (IS_ERR(priv->wol_clk)) {
2589+
ret = PTR_ERR(priv->wol_clk);
2590+
goto err_deregister_fixed_link;
2591+
}
25902592

25912593
/* Set the needed headroom once and for all */
25922594
BUILD_BUG_ON(sizeof(struct bcm_tsb) != 8);

0 commit comments

Comments
 (0)