From: yusuhao <ryusoohow@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Thompson <davthompson@nvidia.com>,
Liming Sun <limings@nvidia.com>, Asmaa Mnebhi <asmaa@nvidia.com>,
netdev@vger.kernel.org, yusuhao <2025461029@korea.edu>
Subject: [PATCH net] mlxbf_gige: propagate IRQ lookup errors
Date: Sat, 05 Dec 2026 11:22:30 +0000 [thread overview]
Message-ID: <179646975038.118578.13289418743188183076@gmail.com> (raw)
From: yusuhao <2025461029@korea.edu>
platform_get_irq() can return an error when an interrupt provider is not
ready. The probe stores all three interrupt lookup results and later
passes them to request_irq(), which hides a negative lookup error as an
invalid IRQ number.
Check each IRQ lookup and return its error before continuing the probe.
An AI coding assistant identified the unchecked returns during source
review and drafted the fix and changelog.
Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
Cc: stable@vger.kernel.org
Signed-off-by: yusuhao <2025461029@korea.edu>
---
.../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index d1f8a72cae53..fe225b7b3c6d 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -453,8 +453,22 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
}
priv->error_irq = platform_get_irq(pdev, MLXBF_GIGE_ERROR_INTR_IDX);
+ if (priv->error_irq < 0) {
+ err = priv->error_irq;
+ goto out;
+ }
+
priv->rx_irq = platform_get_irq(pdev, MLXBF_GIGE_RECEIVE_PKT_INTR_IDX);
+ if (priv->rx_irq < 0) {
+ err = priv->rx_irq;
+ goto out;
+ }
+
priv->llu_plu_irq = platform_get_irq(pdev, MLXBF_GIGE_LLU_PLU_INTR_IDX);
+ if (priv->llu_plu_irq < 0) {
+ err = priv->llu_plu_irq;
+ goto out;
+ }
phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy", 0);
if (phy_irq == -EPROBE_DEFER) {
--
2.56.0
next reply other threads:[~2026-12-05 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 11:22 yusuhao [this message]
2026-12-05 11:28 ` [PATCH net] mlxbf_gige: propagate IRQ lookup errors netdev-bot+sinfo
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=179646975038.118578.13289418743188183076@gmail.com \
--to=ryusoohow@gmail.com \
--cc=2025461029@korea.edu \
--cc=andrew+netdev@lunn.ch \
--cc=asmaa@nvidia.com \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=limings@nvidia.com \
--cc=netdev@vger.kernel.org \
--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