mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Lucas Sproule <lucas.sproule.42@gmail.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom_wcnss: Fix error check after devm_ioremap_wc() switch
Date: Mon, 31 Aug 2026 09:32:21 +0200	[thread overview]
Message-ID: <4f016e11-ad28-40d8-983a-ecc5330f4273@oss.qualcomm.com> (raw)
In-Reply-To: <20260827072735.2262888-1-lucas.sproule.42@gmail.com>

On 8/27/26 9:27 AM, Lucas Sproule wrote:
> Commit f9b888599418 ("remoteproc: qcom_wcnss: Fix reserved region
> mapping failure") switched back from devm_ioremap_resource_wc() to
> devm_ioremap_wc(), but kept the IS_ERR() check that had been added to
> match the resource variant.
> 
> devm_ioremap_wc() returns NULL on failure rather than an error pointer,
> so IS_ERR() never fires and wcnss_alloc_memory_region() returns success
> with wcnss->mem_region left NULL.  Probe completes, and every subsequent
> firmware boot then fails with a bare -EINVAL from qcom_mdt_load_no_init(),
> masking the real mapping failure.
> 
> Check for NULL instead, and return -ENOMEM to match the other remoteproc
> drivers.
> 
> Fixes: f9b888599418 ("remoteproc: qcom_wcnss: Fix reserved region mapping failure")
> Cc: stable@vger.kernel.org # v7.0+
> Signed-off-by: Lucas Sproule <lucas.sproule.42@gmail.com>
> ---
>  drivers/remoteproc/qcom_wcnss.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
> index c856a92af43c..90747af237f7 100644
> --- a/drivers/remoteproc/qcom_wcnss.c
> +++ b/drivers/remoteproc/qcom_wcnss.c
> @@ -542,9 +542,9 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)
>   wcnss->mem_phys = wcnss->mem_reloc = res.start;
>   wcnss->mem_size = resource_size(&res);
>   wcnss->mem_region = devm_ioremap_wc(wcnss->dev, wcnss->mem_phys, wcnss->mem_size);
> - if (IS_ERR(wcnss->mem_region)) {
> + if (!wcnss->mem_region) {
>     dev_err(wcnss->dev, "unable to map memory region: %pR\n", &res);
> -   return PTR_ERR(wcnss->mem_region);
> +   return -ENOMEM;
>   }

It seems like whatever program you used to send this patch messed up its
contents by squashing the whitespace - I would recommend using the b4
tool:

https://b4.docs.kernel.org/en/latest/index.html

for the patch itself, please carry my:

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

      reply	other threads:[~2026-08-31  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  7:27 Lucas Sproule
2026-08-31  7:32 ` 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=4f016e11-ad28-40d8-983a-ecc5330f4273@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=lucas.sproule.42@gmail.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    /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®