diff --git a/arch/renesas/src/rx65n/rx65n_usbhost.c b/arch/renesas/src/rx65n/rx65n_usbhost.c index c30bd9434c..152d398fd7 100644 --- a/arch/renesas/src/rx65n/rx65n_usbhost.c +++ b/arch/renesas/src/rx65n/rx65n_usbhost.c @@ -8363,7 +8363,7 @@ struct usbhost_connection_s *rx65n_usbhost_initialize(int controller) /* Initialize semaphores & mutex */ nxsem_init(&priv->pscsem, 0, 0); - nxmutex_lock(&priv->lock); + nxmutex_init(&priv->lock); #ifndef CONFIG_USBHOST_INT_DISABLE priv->ininterval = MAX_PERINTERVAL; diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index 657becdcaf..d042abdbd0 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -2679,7 +2679,7 @@ errout_with_fs1: inode_release(ui->ui_fs[0].um_node); errout_with_uinode: - nxmutex_lock(&ui->ui_lock); + nxmutex_destroy(&ui->ui_lock); kmm_free(ui); return ret; }