]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: bcmasp: fix double free of WoL irq
authorJustin Chen <justin.chen@broadcom.com>
Thu, 19 Mar 2026 23:48:12 +0000 (16:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Mar 2026 02:07:28 +0000 (19:07 -0700)
We do not need to free wol_irq since it was instantiated with
devm_request_irq(). So devres will free for us.

Fixes: a2f0751206b0 ("net: bcmasp: Add support for WoL magic packet")
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260319234813.1937315-2-justin.chen@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/asp2/bcmasp.c

index aa6d8606849f0f0b1a3ffbbaa124804eb40c4059..2034a1593db71401f85e1b167821720debce8203 100644 (file)
@@ -1152,12 +1152,6 @@ void bcmasp_enable_wol(struct bcmasp_intf *intf, bool en)
        }
 }
 
-static void bcmasp_wol_irq_destroy(struct bcmasp_priv *priv)
-{
-       if (priv->wol_irq > 0)
-               free_irq(priv->wol_irq, priv);
-}
-
 static void bcmasp_eee_fixup(struct bcmasp_intf *intf, bool en)
 {
        u32 reg, phy_lpi_overwrite;
@@ -1363,7 +1357,6 @@ static int bcmasp_probe(struct platform_device *pdev)
        return ret;
 
 err_cleanup:
-       bcmasp_wol_irq_destroy(priv);
        bcmasp_remove_intfs(priv);
 
        return ret;
@@ -1376,7 +1369,6 @@ static void bcmasp_remove(struct platform_device *pdev)
        if (!priv)
                return;
 
-       bcmasp_wol_irq_destroy(priv);
        bcmasp_remove_intfs(priv);
 }