From: Avi Weiss <thnkslprpt@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
Sricharan Ramabadhran <quic_srichara@quicinc.com>,
Arun Kumar Neelakantam <quic_aneela@quicinc.com>,
linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] rpmsg: glink: smem: preserve IRQ acquisition errors
Date: Tue, 13 Oct 2026 15:43:28 +0300 [thread overview]
Message-ID: <20261013124328.1273340-1-thnkslprpt@gmail.com> (raw)
qcom_glink_smem_register() passes the result of of_irq_get() directly
to devm_request_irq(). Negative errors are converted to unsigned IRQ
numbers, causing the IRQ request to return -EINVAL instead of the
original error.
Check the IRQ before requesting it. Preserve negative errors and
return -EINVAL if the IRQ mapping fails.
Fixes: caf989c350e8e ("rpmsg: glink: Introduce glink smem based transport")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
A dev_err_probe() diagnostic can be added for IRQ acquisition failures
if preferred.
drivers/rpmsg/qcom_glink_smem.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c
index 35bb03e67ae8..010a7da64906 100644
--- a/drivers/rpmsg/qcom_glink_smem.c
+++ b/drivers/rpmsg/qcom_glink_smem.c
@@ -312,6 +312,11 @@ struct qcom_glink_smem *qcom_glink_smem_register(struct device *parent,
}
smem->irq = of_irq_get(smem->dev.of_node, 0);
+ if (smem->irq <= 0) {
+ ret = smem->irq ?: -EINVAL;
+ goto err_put_dev;
+ }
+
ret = devm_request_irq(&smem->dev, smem->irq, qcom_glink_smem_intr,
IRQF_NO_SUSPEND | IRQF_NO_AUTOEN,
"glink-smem", smem);
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.43.0
next reply other threads:[~2026-10-13 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 12:43 Avi Weiss [this message]
2026-10-13 15:04 ` Konrad Dybcio
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=20261013124328.1273340-1-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=andersson@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=quic_aneela@quicinc.com \
--cc=quic_srichara@quicinc.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
all inboxes | Powered by JetHome®