[PATCH] thunderbolt: unlock on error path in tb_domain_add()

Dan Carpenter dan.carpenter at oracle.com
Tue Mar 23 13:19:06 GMT 2021


We accidentally deleted this unlock on the error path.  Undelete it.

Fixes: 7f0a34d7900b ("thunderbolt: Decrease control channel timeout for software connection manager")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
 drivers/thunderbolt/domain.c | 1 +
 1 files changed, 1 insertions(+), 0 deletion(-)

diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index a7d83eec3d15..98f4056f89ff 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -493,6 +493,7 @@ int tb_domain_add(struct tb *tb)
 	device_del(&tb->dev);
 err_ctl_stop:
 	tb_ctl_stop(tb->ctl);
+	mutex_unlock(&tb->lock);
 
 	return ret;
 }



More information about the linux-mtd mailing list