summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/sprd_thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/sprd_thermal.c')
-rw-r--r--drivers/thermal/sprd_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c
index 58f995b0f804..3682edb2f466 100644
--- a/drivers/thermal/sprd_thermal.c
+++ b/drivers/thermal/sprd_thermal.c
@@ -350,8 +350,8 @@ static int sprd_thm_probe(struct platform_device *pdev)
thm->var_data = pdata;
thm->base = devm_platform_ioremap_resource(pdev, 0);
- if (!thm->base)
- return -ENOMEM;
+ if (IS_ERR(thm->base))
+ return PTR_ERR(thm->base);
thm->nr_sensors = of_get_child_count(np);
if (thm->nr_sensors == 0 || thm->nr_sensors > SPRD_THM_MAX_SENSOR) {