From: Qinglang Miao Date: Mon, 21 Sep 2020 13:11:07 +0000 (+0800) Subject: thermal: stm32: simplify the return expression of stm_thermal_prepare() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=be52a1963f8333a0ca1bba3d3c28e6332114432a;p=linux.git thermal: stm32: simplify the return expression of stm_thermal_prepare() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200921131107.93273-1-miaoqinglang@huawei.com --- diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 331e2b768df54..5fd3fb8912a6a 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)