lkml.org 
[lkml]   [2022]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] thermal/drivers/imx: add missing pm_runtime_put on error path
Date
We took a reference so need to put it back when imx_get_temp() returns
EAGAIN.

Fixes: 4cf2ddf16e17 ("thermal/drivers/imx: Implement runtime PM support")
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
stumbled upon this merging our stable tree, but I don't actually use
imx-thermal so haven't tested it.

drivers/thermal/imx_thermal.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 16663373b682..641f90f9c750 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -265,6 +265,7 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)

if ((val & soc_data->temp_valid_mask) == 0) {
dev_dbg(&tz->device, "temp measurement never finished\n");
+ pm_runtime_put(data->dev);
return -EAGAIN;
}

--
2.34.1
\
 
 \ /
  Last update: 2022-02-17 05:53    [W:0.105 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site