This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit efd7e31b3a5076dbbdb7111e5d21146a216ff5af
Author: wangjianyu3 <[email protected]>
AuthorDate: Wed Sep 18 03:37:45 2024 +0800

    Thermal/procfs: Remove unnecessary nxmutex_unlock
    
    https://github.com/apache/nuttx/pull/12824
    Signed-off-by: wangjianyu3 <[email protected]>
---
 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;
     }
 

Reply via email to