summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-06-06 11:21:22 +0300
committerBjorn Andersson <andersson@kernel.org>2023-06-13 21:57:26 +0300
commit3aed112953b1877ede66ae77afa4e5a5024be7cb (patch)
tree7296df8d07dd5813d3c6a2e52c1dffb263222d37 /drivers/soc
parentd9c2a255cfe026c8bf85a39631734f022ecefaff (diff)
downloadlinux-3aed112953b1877ede66ae77afa4e5a5024be7cb.tar.xz
soc: qcom: Fix a IS_ERR() vs NULL bug in probe
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> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/ZH7sgpLAN23bCz9v@moroto
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/rpm_master_stats.c2
1 files changed, 1 insertions, 1 deletions
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);