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:
parent
88cc4b1120
commit
efd7e31b3a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user