From: Dan Carpenter <error27@gmail.com>
To: Francisco Munoz Ruiz <francisco.ruiz@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] soc: qcom: llcc-qcom: Fix NULL vs IS_ERR() bug in qcom_llcc_get_fw_config()
Date: Wed, 20 May 2026 09:00:30 +0300 [thread overview]
Message-ID: <ag1N_rAHEQ1YJsa7@stanley.mountain> (raw)
The devm_memremap() function doesn't return NULL, it returns error
pointers. Fix the error checking to match.
Fixes: ac23106a9b9a ("soc: qcom: llcc-qcom: get SCT descriptors from fw-populated memory")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/soc/qcom/llcc-qcom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index dcc08f63e020..2006bfe198ea 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -5231,9 +5231,9 @@ static int qcom_llcc_get_fw_config(struct platform_device *pdev)
}
slc_mem = devm_memremap(dev, res.start, resource_size(&res), MEMREMAP_WB);
- if (!slc_mem) {
+ if (IS_ERR(slc_mem)) {
dev_err(dev, "Failed to memremap SLC shared memory\n");
- return -ENOMEM;
+ return PTR_ERR(slc_mem);
}
ret = qcom_llcc_verify_fw_config(dev, slc_mem);
--
2.53.0
next reply other threads:[~2026-05-20 6:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 6:00 Dan Carpenter [this message]
2026-05-20 8:06 ` Mukesh Ojha
2026-05-23 2:19 ` 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=ag1N_rAHEQ1YJsa7@stanley.mountain \
--to=error27@gmail.com \
--cc=andersson@kernel.org \
--cc=francisco.ruiz@oss.qualcomm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@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
Powered by JetHome