From: Quchaosheng cc770_platform_probe() turns every failure of platform_get_irq() into -ENODEV, including -EPROBE_DEFER. Return the error unchanged so that a deferred probe stays deferred, and keep -ENODEV for the case where no interrupt is described at all. The memory resource is checked separately for the same reason, so that a missing resource is still reported as -ENODEV rather than being confused with an interrupt lookup failure. The same pattern is used by other CAN platform drivers, such as c_can_platform.c and flexcan-core.c. Signed-off-by: Quchaosheng Link: https://patch.msgid.link/20260914055611.495105-1-quchaosheng000406@163.com Signed-off-by: Marc Kleine-Budde --- drivers/net/can/cc770/cc770_platform.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c index b6c4f02ffb97..ac218acedb10 100644 --- a/drivers/net/can/cc770/cc770_platform.c +++ b/drivers/net/can/cc770/cc770_platform.c @@ -156,8 +156,13 @@ static int cc770_platform_probe(struct platform_device *pdev) int err, irq; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!mem) + return -ENODEV; + irq = platform_get_irq(pdev, 0); - if (!mem || irq <= 0) + if (irq < 0) + return irq; + if (!irq) return -ENODEV; mem_size = resource_size(mem); -- 2.53.0