[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220217044132.1980370-1-dominique.martinet@atmark-techno.com>
Date: Thu, 17 Feb 2022 13:41:32 +0900
From: Dominique Martinet <dominique.martinet@...ark-techno.com>
To: Oleksij Rempel <linux@...pel-privat.de>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Petr Beneš <petr.benes@...ft.com>,
Dominique Martinet <dominique.martinet@...ark-techno.com>
Subject: [PATCH] thermal/drivers/imx: add missing pm_runtime_put on error path
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@...ark-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
Powered by blists - more mailing lists