From: phucduc.bui@gmail.com
To: Jiri Slaby <jirislaby@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frank Li <Frank.Li@nxp.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Yenchia Chen <yenchia.chen@mediatek.com>,
Daniel Golle <daniel@makrotopia.org>,
Zhiyong Tao <zhiyong.tao@mediatek.com>,
Sherry Sun <sherry.sun@nxp.com>, Robin Gong <yibin.gong@nxp.com>,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
Praveen Talari <praveen.talari@oss.qualcomm.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Zong Jiang <quic_zongjian@quicinc.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Aniket Randive <aniket.randive@oss.qualcomm.com>,
Kathiravan Thirumoorthy
<kathiravan.thirumoorthy@oss.qualcomm.com>,
Anup Kulkarni <anup.kulkarni@oss.qualcomm.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-mediatek@lists.infradead.org, imx@lists.linux.dev,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 3/3] serial: 8250_mtk: Propagate errors from optional IRQ lookup
Date: Fri, 7 Aug 2026 16:09:45 +0700 [thread overview]
Message-ID: <20260807090945.41690-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260807090945.41690-1-phucduc.bui@gmail.com>
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
prev parent reply other threads:[~2026-08-07 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260807090945.41690-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aniket.randive@oss.qualcomm.com \
--cc=anup.kulkarni@oss.qualcomm.com \
--cc=daniel@makrotopia.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=jirislaby@kernel.org \
--cc=kathiravan.thirumoorthy@oss.qualcomm.com \
--cc=kernel@pengutronix.de \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=praveen.talari@oss.qualcomm.com \
--cc=quic_zongjian@quicinc.com \
--cc=s.hauer@pengutronix.de \
--cc=sherry.sun@nxp.com \
--cc=viken.dadhaniya@oss.qualcomm.com \
--cc=yenchia.chen@mediatek.com \
--cc=yibin.gong@nxp.com \
--cc=zhiyong.tao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox