This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 9f85eaf3cb drivers/thermal: Fix work not queued after getting 
temperature fails
9f85eaf3cb is described below

commit 9f85eaf3cb51ca79b0fca4ba9821afe997b5e615
Author: wangjianyu3 <wangjian...@xiaomi.com>
AuthorDate: Sat Feb 22 07:58:05 2025 +0800

    drivers/thermal: Fix work not queued after getting temperature fails
    
    The work will be stopped after get_temp() fails.
    
    Signed-off-by: wangjianyu3 <wangjian...@xiaomi.com>
---
 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;

Reply via email to