]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: systemport: Fix an error handling path in bcm_sysport_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 15 May 2022 17:01:56 +0000 (19:01 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:22:38 +0000 (09:22 +0200)
BugLink: https://bugs.launchpad.net/bugs/1981375
[ Upstream commit ef6b1cd11962aec21c58d137006ab122dbc8d6fd ]

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>
Link: https://lore.kernel.org/r/99d70634a81c229885ae9e4ee69b2035749f7edc.1652634040.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/broadcom/bcmsysport.c

index 0877b3d7f88c5f1fd94354f105f0f208c24b5515..ae541a9d1eeed4bcce026b3a2f398671c09775a8 100644 (file)
@@ -2585,8 +2585,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);