From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: andersson@kernel.org, robh@kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH] remoteproc: k3: Fix NULL vs IS_ERR() bug in k3_reserved_mem_init()
Date: Tue, 3 Mar 2026 09:02:24 -0700 [thread overview]
Message-ID: <aacGEIWvvdy6k4kx@p14s> (raw)
In-Reply-To: <20260227092110.4044313-1-nichen@iscas.ac.cn>
On Fri, Feb 27, 2026 at 05:21:10PM +0800, Chen Ni wrote:
> The devm_ioremap_resource_wc() function never returns NULL, it returns
> error pointers. Update the error checking to match.
>
> Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/remoteproc/ti_k3_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
I have applied both patches.
Thanks,
Mathieu
> diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
> index 32aa954dc5be..3cb8ae5d72f6 100644
> --- a/drivers/remoteproc/ti_k3_common.c
> +++ b/drivers/remoteproc/ti_k3_common.c
> @@ -513,7 +513,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc)
> kproc->rmem[i].dev_addr = (u32)res.start;
> kproc->rmem[i].size = resource_size(&res);
> kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &res);
> - if (!kproc->rmem[i].cpu_addr) {
> + if (IS_ERR(kproc->rmem[i].cpu_addr)) {
> dev_err(dev, "failed to map reserved memory#%d at %pR\n",
> i + 1, &res);
> return -ENOMEM;
> --
> 2.25.1
>
prev parent reply other threads:[~2026-03-03 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 9:21 [PATCH] remoteproc: k3: Fix NULL vs IS_ERR() bug in k3_reserved_mem_init() Chen Ni
2026-03-02 9:46 ` Peng Fan
2026-03-03 16:02 ` Mathieu Poirier [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=aacGEIWvvdy6k4kx@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=nichen@iscas.ac.cn \
--cc=robh@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