* [PATCH 1/3] serial: qcom-geni: Propagate errors from optional IRQ lookup
@ 2026-08-07 9:09 phucduc.bui
2026-08-07 9:09 ` [PATCH 2/3] tty: serial: imx: " phucduc.bui
2026-08-07 9:09 ` [PATCH 3/3] serial: 8250_mtk: " phucduc.bui
0 siblings, 2 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-07 9:09 UTC (permalink / raw)
To: Jiri Slaby, Greg Kroah-Hartman, Frank Li,
AngeloGioacchino Del Regno, Sascha Hauer, Fabio Estevam,
Yenchia Chen, Daniel Golle, Zhiyong Tao, Sherry Sun, Robin Gong,
Viken Dadhaniya, Praveen Talari
Cc: Matthias Brugger, Pengutronix Kernel Team, Zong Jiang,
Konrad Dybcio, Aniket Randive, Kathiravan Thirumoorthy,
Anup Kulkarni, Krzysztof Kozlowski, linux-kernel, linux-serial,
linux-mediatek, imx, linux-arm-msm, linux-arm-kernel,
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>
---
drivers/tty/serial/qcom_geni_serial.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 7ead87b4eb65..240a6d67d847 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1883,8 +1883,13 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
uport->irq = irq;
uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_QCOM_GENI_CONSOLE);
- if (!data->console)
+ if (!data->console) {
port->wakeup_irq = platform_get_irq_optional(pdev, 1);
+ if (port->wakeup_irq < 0 && port->wakeup_irq != -ENXIO) {
+ ret = port->wakeup_irq;
+ goto error;
+ }
+ }
if (of_property_read_bool(pdev->dev.of_node, "rx-tx-swap"))
port->rx_tx_swap = true;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/3] tty: serial: imx: Propagate errors from optional IRQ lookup
2026-08-07 9:09 [PATCH 1/3] serial: qcom-geni: Propagate errors from optional IRQ lookup phucduc.bui
@ 2026-08-07 9:09 ` phucduc.bui
2026-08-07 9:09 ` [PATCH 3/3] serial: 8250_mtk: " phucduc.bui
1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-07 9:09 UTC (permalink / raw)
To: Jiri Slaby, Greg Kroah-Hartman, Frank Li,
AngeloGioacchino Del Regno, Sascha Hauer, Fabio Estevam,
Yenchia Chen, Daniel Golle, Zhiyong Tao, Sherry Sun, Robin Gong,
Viken Dadhaniya, Praveen Talari
Cc: Matthias Brugger, Pengutronix Kernel Team, Zong Jiang,
Konrad Dybcio, Aniket Randive, Kathiravan Thirumoorthy,
Anup Kulkarni, Krzysztof Kozlowski, linux-kernel, linux-serial,
linux-mediatek, imx, linux-arm-msm, linux-arm-kernel,
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>
---
drivers/tty/serial/imx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 251a50c8aa38..4224454d360e 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2463,7 +2463,11 @@ static int imx_uart_probe(struct platform_device *pdev)
if (rxirq < 0)
return rxirq;
txirq = platform_get_irq_optional(pdev, 1);
+ if (txirq < 0 && txirq != -ENXIO)
+ return txirq;
rtsirq = platform_get_irq_optional(pdev, 2);
+ if (rtsirq < 0 && rtsirq != -ENXIO)
+ return rtsirq;
sport->port.dev = &pdev->dev;
sport->port.mapbase = res->start;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] serial: 8250_mtk: Propagate errors from optional IRQ lookup
2026-08-07 9:09 [PATCH 1/3] serial: qcom-geni: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-07 9:09 ` [PATCH 2/3] tty: serial: imx: " phucduc.bui
@ 2026-08-07 9:09 ` phucduc.bui
1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-07 9:09 UTC (permalink / raw)
To: Jiri Slaby, Greg Kroah-Hartman, Frank Li,
AngeloGioacchino Del Regno, Sascha Hauer, Fabio Estevam,
Yenchia Chen, Daniel Golle, Zhiyong Tao, Sherry Sun, Robin Gong,
Viken Dadhaniya, Praveen Talari
Cc: Matthias Brugger, Pengutronix Kernel Team, Zong Jiang,
Konrad Dybcio, Aniket Randive, Kathiravan Thirumoorthy,
Anup Kulkarni, Krzysztof Kozlowski, linux-kernel, linux-serial,
linux-mediatek, imx, linux-arm-msm, linux-arm-kernel,
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>
---
drivers/tty/serial/8250/8250_mtk.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index e6a56cf54ae0..d0d2aecf9005 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -587,6 +587,8 @@ static int mtk8250_probe(struct platform_device *pdev)
return data->line;
data->rx_wakeup_irq = platform_get_irq_optional(pdev, 1);
+ if (data->rx_wakeup_irq < 0 && data->rx_wakeup_irq != -ENXIO)
+ return data->rx_wakeup_irq;
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-07 9:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 9:09 [PATCH 1/3] serial: qcom-geni: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-07 9:09 ` [PATCH 2/3] tty: serial: imx: " phucduc.bui
2026-08-07 9:09 ` [PATCH 3/3] serial: 8250_mtk: " phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox