6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Justin Chen [ Upstream commit cbfa5be2bf64511d49b854a0f9fd6d0b5118621f ] 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 Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20260319234813.1937315-2-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/asp2/bcmasp.c | 21 --------------------- drivers/net/ethernet/broadcom/asp2/bcmasp.h | 2 -- 2 files changed, 23 deletions(-) diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c index d9e9ec2e8945d..a419e71608872 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c @@ -1118,12 +1118,6 @@ static void bcmasp_enable_wol_shared(struct bcmasp_intf *intf, bool en) } } -static void bcmasp_wol_irq_destroy_shared(struct bcmasp_priv *priv) -{ - if (priv->wol_irq > 0) - free_irq(priv->wol_irq, priv); -} - static void bcmasp_init_wol_per_intf(struct bcmasp_priv *priv) { struct platform_device *pdev = priv->pdev; @@ -1156,16 +1150,6 @@ static void bcmasp_enable_wol_per_intf(struct bcmasp_intf *intf, bool en) device_set_wakeup_enable(dev, en); } -static void bcmasp_wol_irq_destroy_per_intf(struct bcmasp_priv *priv) -{ - struct bcmasp_intf *intf; - - list_for_each_entry(intf, &priv->intfs, list) { - if (intf->wol_irq > 0) - free_irq(intf->wol_irq, priv); - } -} - static struct bcmasp_hw_info v20_hw_info = { .rx_ctrl_flush = ASP_RX_CTRL_FLUSH, .umac2fb = UMAC2FB_OFFSET, @@ -1177,7 +1161,6 @@ static struct bcmasp_hw_info v20_hw_info = { static const struct bcmasp_plat_data v20_plat_data = { .init_wol = bcmasp_init_wol_per_intf, .enable_wol = bcmasp_enable_wol_per_intf, - .destroy_wol = bcmasp_wol_irq_destroy_per_intf, .hw_info = &v20_hw_info, }; @@ -1193,7 +1176,6 @@ static struct bcmasp_hw_info v21_hw_info = { static const struct bcmasp_plat_data v21_plat_data = { .init_wol = bcmasp_init_wol_shared, .enable_wol = bcmasp_enable_wol_shared, - .destroy_wol = bcmasp_wol_irq_destroy_shared, .hw_info = &v21_hw_info, }; @@ -1267,7 +1249,6 @@ static int bcmasp_probe(struct platform_device *pdev) priv->init_wol = pdata->init_wol; priv->enable_wol = pdata->enable_wol; - priv->destroy_wol = pdata->destroy_wol; priv->hw_info = pdata->hw_info; /* Enable all clocks to ensure successful probing */ @@ -1331,7 +1312,6 @@ static int bcmasp_probe(struct platform_device *pdev) if (ret) { netdev_err(intf->ndev, "failed to register net_device: %d\n", ret); - priv->destroy_wol(priv); bcmasp_remove_intfs(priv); goto of_put_exit; } @@ -1352,7 +1332,6 @@ static int bcmasp_remove(struct platform_device *pdev) if (!priv) return 0; - priv->destroy_wol(priv); bcmasp_remove_intfs(priv); return 0; diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.h b/drivers/net/ethernet/broadcom/asp2/bcmasp.h index ec90add6b03e2..985a473339559 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.h +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.h @@ -371,7 +371,6 @@ struct bcmasp_hw_info { struct bcmasp_plat_data { void (*init_wol)(struct bcmasp_priv *priv); void (*enable_wol)(struct bcmasp_intf *intf, bool en); - void (*destroy_wol)(struct bcmasp_priv *priv); struct bcmasp_hw_info *hw_info; }; @@ -389,7 +388,6 @@ struct bcmasp_priv { void (*init_wol)(struct bcmasp_priv *priv); void (*enable_wol)(struct bcmasp_intf *intf, bool en); - void (*destroy_wol)(struct bcmasp_priv *priv); void __iomem *base; struct bcmasp_hw_info *hw_info; -- 2.53.0