* [PATCH v2] usb: xhci: tegra: Propagate errors from optional IRQ lookup
@ 2026-08-07 6:24 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-08-07 6:24 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Thierry Reding,
Jonathan Hunter, linux-usb
Cc: linux-kernel, linux-tegra, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Links v1:
https://lore.kernel.org/all/20260806063933.27331-1-phucduc.bui@gmail.com/
Changes in v2:
- Update the commit message and error handling.
- Propagate all errors from platform_get_irq_optional() except -ENXIO,
instead of only handling -EPROBE_DEFER.
drivers/usb/host/xhci-tegra.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index e7e6d569f1db..d7ae279acdf0 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1571,8 +1571,11 @@ static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct tegra_xu
struct irq_data *data;
tegra->wake_irqs[i] = platform_get_irq_optional(pdev, i + WAKE_IRQ_START_INDEX);
- if (tegra->wake_irqs[i] < 0)
+ if (tegra->wake_irqs[i] < 0) {
+ if (tegra->wake_irqs[i] != -ENXIO)
+ return tegra->wake_irqs[i];
break;
+ }
data = irq_get_irq_data(tegra->wake_irqs[i]);
if (!data) {
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-07 6:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 6:24 [PATCH v2] usb: xhci: tegra: Propagate errors from optional IRQ lookup phucduc.bui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.