Netdev List
 help / color / mirror / Atom feed
* [PATCH net] mlxbf_gige: propagate IRQ lookup errors
@ 2026-12-05 11:22 yusuhao
  2026-12-05 11:28 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: yusuhao @ 2026-12-05 11:22 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	David Thompson, Liming Sun, Asmaa Mnebhi, netdev, yusuhao

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] mlxbf_gige: propagate IRQ lookup errors
  2026-12-05 11:22 [PATCH net] mlxbf_gige: propagate IRQ lookup errors yusuhao
@ 2026-12-05 11:28 ` netdev-bot+sinfo
  0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-12-05 11:28 UTC (permalink / raw)
  To: yusuhao
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, David Thompson, Liming Sun, Asmaa Mnebhi, netdev,
	yusuhao

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - What hardware the change was tested on. For driver fixes please
   mention the device (and if relevant firmware version) used for
   testing, or say that the change was not tested on real hardware.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-05 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 11:22 [PATCH net] mlxbf_gige: propagate IRQ lookup errors yusuhao
2026-12-05 11:28 ` netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox