cpufreq: qcom-hw: Fix return value check in qcom_cpufreq_hw_cpu_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 4 Mar 2021 10:04:23 +0000 (10:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:33 +0000 (17:06 +0100)
commite50ada589497a0b5cf8eba3ecdf001ad5603a5fe
treeaa33b00bf295d3e82deeec986b80183d666e3c0e
parent7dfe37e9ea6985c932b2d4fd5ba67b889b453488
cpufreq: qcom-hw: Fix return value check in qcom_cpufreq_hw_cpu_init()

[ Upstream commit 536eb97abeba857126ad055de5923fa592acef25 ]

In case of error, the function ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Fixes: 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/qcom-cpufreq-hw.c