From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: Fix a IS_ERR() vs NULL bug in probe
Date: Tue, 6 Jun 2023 11:32:44 +0200 [thread overview]
Message-ID: <bcd80f0a-6282-259b-23d3-a77baf2cf94b@linaro.org> (raw)
In-Reply-To: <ZH7sgpLAN23bCz9v@moroto>
On 6.06.2023 10:21, Dan Carpenter wrote:
> The devm_ioremap() function returns NULL on error, it never returns
> error pointers.
>
> Fixes: a77b2a0b1280 ("soc: qcom: Introduce RPM master stats driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
Thanks!
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> drivers/soc/qcom/rpm_master_stats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/rpm_master_stats.c b/drivers/soc/qcom/rpm_master_stats.c
> index 6dd98b9f7129..9ca13bcf67d3 100644
> --- a/drivers/soc/qcom/rpm_master_stats.c
> +++ b/drivers/soc/qcom/rpm_master_stats.c
> @@ -105,7 +105,7 @@ static int master_stats_probe(struct platform_device *pdev)
> }
>
> data[i].base = devm_ioremap(dev, res.start, resource_size(&res));
> - if (IS_ERR(data[i].base)) {
> + if (!data[i].base) {
> debugfs_remove_recursive(root);
> return dev_err_probe(dev, -EINVAL,
> "Could not map the MSG RAM slice idx %d!\n", i);
next prev parent reply other threads:[~2023-06-06 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:21 [PATCH] soc: qcom: Fix a IS_ERR() vs NULL bug in probe Dan Carpenter
2023-06-06 9:32 ` Konrad Dybcio [this message]
2023-06-13 22:30 ` Bjorn Andersson
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=bcd80f0a-6282-259b-23d3-a77baf2cf94b@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@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;
as well as URLs for NNTP newsgroup(s).