]> asedeno.scripts.mit.edu Git - linux.git/commit
thermal: qcom: tsens: Fix return value check in init_common()
authorWei Yongjun <weiyj.lk@gmail.com>
Sat, 30 Jul 2016 06:32:37 +0000 (06:32 +0000)
committerZhang Rui <rui.zhang@intel.com>
Tue, 27 Sep 2016 06:02:16 +0000 (14:02 +0800)
commit809eb35045097bc7da56fa8bba1f6b4cd1b721ba
tree986d64eb56bb0bdfe8ae0a34112c33968a1ef9ec
parent5ef62de751dcd21b3853368ab47eedcbc1cf3475
thermal: qcom: tsens: Fix return value check in init_common()

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

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/qcom/tsens-common.c