[kernel][port] add a missing THREAD_UNLOCK call in port_group_remove()

port_group_remove() used to return without unlocking a thread if no
matching read port is found, which is not correct. This patch adds a
call to THREAD_UNLOCK before it returns ERR_BAD_HANDLE.
This commit is contained in:
Noah Woo
2025-01-03 18:59:13 +00:00
committed by Travis Geiselbrecht
parent 6f32a0f377
commit bea3787d6e

View File

@@ -351,8 +351,10 @@ status_t port_group_remove(port_t group, port_t port) {
}
}
if (!found)
if (!found) {
THREAD_UNLOCK(state);
return ERR_BAD_HANDLE;
}
list_delete(&rp->g_node);