mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Avi Weiss <thnkslprpt@gmail.com>, 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
Subject: Re: [PATCH] rpmsg: glink: smem: preserve IRQ acquisition errors
Date: Tue, 13 Oct 2026 17:04:33 +0200	[thread overview]
Message-ID: <0c195d46-64fe-4d27-9147-678ccd561329@oss.qualcomm.com> (raw)
In-Reply-To: <20261013124328.1273340-1-thnkslprpt@gmail.com>

On 10/13/26 2:43 PM, Avi Weiss wrote:
> 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;
> +	}

platform_get_irq() lets us drop the zero-dance

Konrad

      reply	other threads:[~2026-10-13 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 12:43 Avi Weiss
2026-10-13 15:04 ` Konrad Dybcio [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=0c195d46-64fe-4d27-9147-678ccd561329@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.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 \
    --cc=thnkslprpt@gmail.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®