From: phucduc.bui@gmail.com
To: Justin Chen <justin.chen@broadcom.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Doug Berger <opendmb@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/4] net: bcmasp: Propagate WoL IRQ errors from probe
Date: Thu, 20 Aug 2026 18:14:54 +0700 [thread overview]
Message-ID: <20260820111456.97947-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260820111456.97947-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
bcmasp_init_wol() currently ignores errors returned by
bcmasp_get_and_request_irq() and allows the probe to continue.
Return the error from bcmasp_init_wol() and propagate it to the probe
function instead of silently ignoring the failure to initialize the
WoL IRQ.
Found by manual code inspection.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
index d66a8bbd6e38..02e88adf4939 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
@@ -1106,21 +1106,20 @@ static int bcmasp_get_and_request_irq(struct bcmasp_priv *priv, int i)
return irq;
}
-static void bcmasp_init_wol(struct bcmasp_priv *priv)
+static int bcmasp_init_wol(struct bcmasp_priv *priv)
{
struct platform_device *pdev = priv->pdev;
- struct device *dev = &pdev->dev;
int irq;
irq = bcmasp_get_and_request_irq(priv, 1);
- if (irq < 0) {
- dev_warn(dev, "Failed to init WoL irq: %d\n", irq);
- return;
- }
+ if (irq < 0)
+ return irq;
priv->wol_irq = irq;
priv->wol_irq_enabled_mask = 0;
device_set_wakeup_capable(&pdev->dev, 1);
+
+ return 0;
}
void bcmasp_enable_wol(struct bcmasp_intf *intf, bool en)
@@ -1321,7 +1320,9 @@ static int bcmasp_probe(struct platform_device *pdev)
bcmasp_core_init_filters(priv);
- bcmasp_init_wol(priv);
+ ret = bcmasp_init_wol(priv);
+ if (ret)
+ goto err_clock_disable;
ports_node = of_find_node_by_name(dev->of_node, "ethernet-ports");
if (!ports_node) {
--
2.43.0
next prev parent reply other threads:[~2026-08-20 11:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 11:14 [PATCH 0/4] net: broadcom: Improve IRQ error handling phucduc.bui
2026-08-20 11:14 ` [PATCH 1/4] net: bcmasp: Use platform_get_irq() for IRQ lookup phucduc.bui
2026-08-20 11:14 ` phucduc.bui [this message]
2026-08-20 11:14 ` [PATCH 3/4] net: systemport: Propagate IRQ lookup errors phucduc.bui
2026-08-20 11:14 ` [PATCH 4/4] net: bcmgenet: Propagate WoL IRQ errors phucduc.bui
2026-08-20 13:30 ` [PATCH 0/4] net: broadcom: Improve IRQ error handling Paolo Abeni
2026-08-20 16:45 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260820111456.97947-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox