drivers/thermal: Fix work not queued after getting temperature fails

The work will be stopped after get_temp() fails.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2025-02-22 07:58:05 +08:00 committed by Alan C. Assis
parent fd6d804623
commit 9f85eaf3cb

View file

@ -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;