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

Commit 97488c73 authored by Dan Carpenter's avatar Dan Carpenter Committed by Nicholas Bellinger
Browse files

tcmu: Add a missing unlock on an error path



We added a new error path here but we forgot to drop the lock first
before returning.

Fixes: 0d44374c ("tcmu: fix double se_cmd completion")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 16b93277
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -888,6 +888,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
	ret = tcmu_setup_cmd_timer(tcmu_cmd);
	if (ret) {
		tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt);
		mutex_unlock(&udev->cmdr_lock);
		return TCM_OUT_OF_RESOURCES;
	}
	entry->hdr.cmd_id = tcmu_cmd->cmd_id;