summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 15:11:07 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-10-12 12:08:35 +0200
commitbe52a1963f8333a0ca1bba3d3c28e6332114432a (patch)
tree4e369119810774aacd35dafbd89d904e02020fbf /drivers/thermal
parentdt-bindings: thermal: rcar-gen3-thermal: Add r8a774e1 support (diff)
downloadlinux-be52a1963f8333a0ca1bba3d3c28e6332114432a.tar.xz
linux-be52a1963f8333a0ca1bba3d3c28e6332114432a.zip
thermal: stm32: simplify the return expression of stm_thermal_prepare()
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200921131107.93273-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/st/stm_thermal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
index 331e2b768df5..5fd3fb8912a6 100644
--- a/drivers/thermal/st/stm_thermal.c
+++ b/drivers/thermal/st/stm_thermal.c
@@ -446,14 +446,9 @@ thermal_unprepare:
#ifdef CONFIG_PM_SLEEP
static int stm_thermal_suspend(struct device *dev)
{
- int ret;
struct stm_thermal_sensor *sensor = dev_get_drvdata(dev);
- ret = stm_thermal_sensor_off(sensor);
- if (ret)
- return ret;
-
- return 0;
+ return stm_thermal_sensor_off(sensor);
}
static int stm_thermal_resume(struct device *dev)