Skip to content

Commit 3aed112

Browse files
Dan Carpenterandersson
authored andcommitted
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: a77b2a0 ("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
1 parent d9c2a25 commit 3aed112

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soc/qcom/rpm_master_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int master_stats_probe(struct platform_device *pdev)
105105
}
106106

107107
data[i].base = devm_ioremap(dev, res.start, resource_size(&res));
108-
if (IS_ERR(data[i].base)) {
108+
if (!data[i].base) {
109109
debugfs_remove_recursive(root);
110110
return dev_err_probe(dev, -EINVAL,
111111
"Could not map the MSG RAM slice idx %d!\n", i);

0 commit comments

Comments
 (0)