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:
parent
fd6d804623
commit
9f85eaf3cb
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue