Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e10c02e authored by Ravi Aravamudhan's avatar Ravi Aravamudhan
Browse files

diag: Handle command registration mutex correctly



On removing command registration entries from the registration table
diag driver was not handling the mutexes properly.

Change-Id: I2a15ac736fd665eafb50d40bcb255b911ac216b5
Signed-off-by: default avatarRavi Aravamudhan <aravamud@codeaurora.org>
parent 84bfeac2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -698,8 +698,10 @@ void diag_cmd_remove_reg(struct diag_cmd_reg_entry_t *entry, uint8_t proc)
	temp_entry = diag_cmd_search(entry, proc);
	if (temp_entry) {
		item = container_of(temp_entry, struct diag_cmd_reg_t, entry);
		if (!item)
		if (!item) {
			mutex_unlock(&driver->cmd_reg_mutex);
			return;
		}
		list_del(&item->link);
		kfree(item);
		driver->cmd_reg_count--;