Re: [PATCH] usb: chipidea: ci_hdrc_imx: Propagate -EPROBE_DEFER from IRQ lookup
From: Bui Duc Phuc
Date: Fri Aug 07 2026 - 00:57:57 EST
Hi Greg,
Thank you for your feedback.
> > From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> All lower case?
>
Yes, I’ll keep it lowercase.
> > Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
> > re-probed when the interrupt resource becomes available instead of
> > continuing probe without an IRQ.
>
> How was this found and tested?
>
I found this during code inspection while cleaning up probe functions in
the Rockchip ASoC drivers.
https://lore.kernel.org/all/20260806052136.21034-1-phucduc.bui@xxxxxxxxx/
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure, including -EPROBE_DEFER. The driver
handled positive IRQ numbers but ignored -EPROBE_DEFER, continuing
probe without an IRQ instead of deferring.
I only compile-tested the change. I don't have the hardware to test this
path at runtime.
While reviewing this,I noticed that -EINVAL also deserves to be returned,
not just -EPROBE_DEFER only -ENXIO really means "no IRQ".
I’ll update this to:
if (data->wakeup_irq < 0 && data->wakeup_irq != -ENXIO) {
ret = data->wakeup_irq;
goto err_clk;
}
I also found another issue in the same area:
if (data->wakeup_irq > 0) {
irq_name = devm_kasprintf(dev, GFP_KERNEL,
"%s:wakeup", pdata.name);
if (!irq_name) {
- dev_err_probe(dev, -ENOMEM, "failed to create
irq_name\n");
+ ret = dev_err_probe(dev, -ENOMEM, "failed to
create irq_name\n");
goto err_clk;
}
the error return from dev_err_probe() was not assigned to ret, so the
error path could still return 0.
I’ll send v2 soon.
Best regards,
Phuc