From: Jie Gan <quic_jiegan@quicinc.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
<coresight@lists.linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH next] Coresight: Fix a NULL vs IS_ERR() bug in probe
Date: Mon, 17 Mar 2025 09:07:08 +0800 [thread overview]
Message-ID: <f4d4a369-427b-4fb3-9d49-84f2a0f45aff@quicinc.com> (raw)
In-Reply-To: <dab039b9-d58a-41be-92f0-ff209cfabfe2@stanley.mountain>
On 3/14/2025 6:55 PM, Dan Carpenter wrote:
> The devm_platform_get_and_ioremap_resource() function doesn't
> return NULL, it returns error pointers. Update the checking to
> match.
>
> Fixes: f78d206f3d73 ("Coresight: Add Coresight TMC Control Unit driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/hwtracing/coresight/coresight-ctcu-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-ctcu-core.c b/drivers/hwtracing/coresight/coresight-ctcu-core.c
> index da35d8b4d579..c6bafc96db96 100644
> --- a/drivers/hwtracing/coresight/coresight-ctcu-core.c
> +++ b/drivers/hwtracing/coresight/coresight-ctcu-core.c
> @@ -204,8 +204,8 @@ static int ctcu_probe(struct platform_device *pdev)
> dev->platform_data = pdata;
>
> base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
> - if (!base)
> - return -ENOMEM;
> + if (IS_ERR(base))
> + return PTR_ERR(base);
>
> drvdata->apb_clk = coresight_get_enable_apb_pclk(dev);
> if (IS_ERR(drvdata->apb_clk))
Thanks for fix it. Looks good to me.
Reviewed-by: Jie Gan <quic_jiegan@quicinc.com>
Jie
next prev parent reply other threads:[~2025-03-17 1:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 10:55 Dan Carpenter
2025-03-17 1:07 ` Jie Gan [this message]
2025-03-17 2:13 ` Anshuman Khandual
2025-03-17 10:07 ` Suzuki K Poulose
2025-07-16 19:38 [PATCH next] coresight: " Dan Carpenter
2025-07-18 12:47 ` Mike Leach
2025-07-21 11:16 ` Anshuman Khandual
2025-07-24 13:29 ` Leo Yan
2025-07-21 11:23 ` Suzuki K Poulose
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=f4d4a369-427b-4fb3-9d49-84f2a0f45aff@quicinc.com \
--to=quic_jiegan@quicinc.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=james.clark@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.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®