diff options
| author | bui duc phuc <phucduc.bui@gmail.com> | 2026-08-10 16:31:11 +0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-10 15:37:45 +0200 |
| commit | d32f8ff69d5fc33aa1979cfd85c3bede4305fecd (patch) | |
| tree | 1080caf94112464ab64a3fa648a9bdf2c414625d | |
| parent | a65295ddc2a10820fd855212be8a2271deff9657 (diff) | |
| download | linux-next-d32f8ff69d5fc33aa1979cfd85c3bede4305fecd.tar.gz linux-next-d32f8ff69d5fc33aa1979cfd85c3bede4305fecd.zip | |
usb: chipidea: ci_hdrc_imx: Propagate errors from optional IRQ lookup
platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure. For an optional IRQ, -ENXIO indicates
that no IRQ is available, while other errors should be propagated.
Propagate errors such as -EPROBE_DEFER and -EINVAL instead of continuing
probe without the IRQ.
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260810093112.47807-1-phucduc.bui@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/usb/chipidea/ci_hdrc_imx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 282314eea7fc..6a17b22047b3 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -525,6 +525,10 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) data->supports_runtime_pm = true; data->wakeup_irq = platform_get_irq_optional(pdev, 1); + if (data->wakeup_irq < 0 && data->wakeup_irq != -ENXIO) { + ret = data->wakeup_irq; + goto phy_shutdown; + } if (data->wakeup_irq > 0) { irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s:wakeup", pdata.name); if (!irq_name) { |
