From: yusuhao <2025…@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: stab…@vger.kernel.org Signed-off-by: yusuhao <2025…@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