[PATCH net-next 3/4] can: janz-ican3: don't discard the IRQ lookup error in probe

From: Chaosheng Qu

Date: Fri Oct 16 2026 - 02:12:48 EST


ican3_probe() collapses every failure of platform_get_irq() into
-ENODEV:

mod->irq = platform_get_irq(pdev, 0);
if (mod->irq < 0) {
ret = -ENODEV;
goto out_free_ndev;
}

Return the lookup error unchanged, as the neighbouring CAN platform
drivers do, e.g. commit 057bd6168d98 ("can: cc770: don't discard the IRQ
lookup error in probe").

This driver cannot see -EPROBE_DEFER and the change does not fix a
deferred probe. The device is an MFD child of janz-cmodio, which takes
the interrupt from the carrier board's PCI device, and the driver has
neither an of_match_table nor an ACPI match. The probe should not invent
an error code for a lookup that failed for another reason.

Build tested on x86_64.

Assisted-by: LLM
Signed-off-by: Chaosheng Qu <chaosheng.qu.linux@xxxxxxxxx>
---
drivers/net/can/janz-ican3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 1efdd1fd8caa..a65326b0f11e 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -1944,7 +1944,7 @@ static int ican3_probe(struct platform_device *pdev)
/* find our IRQ number */
mod->irq = platform_get_irq(pdev, 0);
if (mod->irq < 0) {
- ret = -ENODEV;
+ ret = mod->irq;
goto out_free_ndev;
}

--
2.43.0