From 9f85eaf3cb51ca79b0fca4ba9821afe997b5e615 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Sat, 22 Feb 2025 07:58:05 +0800 Subject: [PATCH] drivers/thermal: Fix work not queued after getting temperature fails The work will be stopped after get_temp() fails. Signed-off-by: wangjianyu3 --- drivers/thermal/thermal_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 74d3e349a2..f0c9196292 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -835,7 +835,7 @@ void thermal_zone_device_update(FAR struct thermal_zone_device_s *zdev) if (ret < 0) { therr("Failed to get temperature from zone %s \n", zdev->name); - goto unlock; + goto delayed_work; } zdev->last_temperature = zdev->temperature; @@ -896,6 +896,8 @@ void thermal_zone_device_update(FAR struct thermal_zone_device_s *zdev) } } +delayed_work: + /* Update worker invoke delay */ delay = zdev->params->passive_delay;