summaryrefslogtreecommitdiffstats
path: root/drivers/i3c
diff options
context:
space:
mode:
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>2019-01-25 07:40:32 +0000
committerBoris Brezillon <bbrezillon@kernel.org>2019-01-25 08:48:01 +0100
commit093c61b6a0d5768f48442ec59d671496314cc47d (patch)
tree1717086979c4eae63e36ecfc07f31a222fd8e1de /drivers/i3c
parent49a57857aeea06ca831043acbb0fa5e0f50602fd (diff)
downloadlinux-stable-093c61b6a0d5768f48442ec59d671496314cc47d.tar.gz
linux-stable-093c61b6a0d5768f48442ec59d671496314cc47d.tar.bz2
linux-stable-093c61b6a0d5768f48442ec59d671496314cc47d.zip
i3c: fix missing detach if failed to retrieve i3c dev
If we failed to retrieve the i3c dev, we should detach the i3c dev I.E i3c_master_detach_i3c_dev(). Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index c39f89d2deba..2dc628d4f1ae 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1828,7 +1828,7 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
ret = i3c_master_retrieve_dev_info(newdev);
if (ret)
- goto err_free_dev;
+ goto err_detach_dev;
olddev = i3c_master_search_i3c_dev_duplicate(newdev);
if (olddev) {