From efd7e31b3a5076dbbdb7111e5d21146a216ff5af Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Wed, 18 Sep 2024 03:37:45 +0800 Subject: [PATCH] Thermal/procfs: Remove unnecessary nxmutex_unlock https://github.com/apache/nuttx/pull/12824 Signed-off-by: wangjianyu3 --- drivers/thermal/thermal_procfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_procfs.c b/drivers/thermal/thermal_procfs.c index b3dbcbb7f1..efef0ea162 100644 --- a/drivers/thermal/thermal_procfs.c +++ b/drivers/thermal/thermal_procfs.c @@ -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; }