Thermal/procfs: Remove unnecessary nxmutex_unlock

https://github.com/apache/nuttx/pull/12824
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2024-09-18 03:37:45 +08:00 committed by Xiang Xiao
parent 88cc4b1120
commit efd7e31b3a

View File

@ -316,9 +316,8 @@ int thermal_zone_procfs_register(FAR struct thermal_zone_device_s *zdev)
FAR struct thermal_procfs_s *p;
p = kmm_zalloc(sizeof(struct thermal_procfs_s));
if (!p)
if (p == NULL)
{
nxmutex_unlock(&g_thermal_procfs_lock);
return -ENOMEM;
}