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(). Change-Id: I4161ce67c99c9213d72f90a5369a8911c3f51432 Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Git-commit: 093c61b6a0d5768f48442ec59d671496314cc47d Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
This commit is contained in:
committed by
Alok Chauhan
parent
caabacf134
commit
db35444180
@@ -1828,7 +1828,7 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
|
|||||||
|
|
||||||
ret = i3c_master_retrieve_dev_info(newdev);
|
ret = i3c_master_retrieve_dev_info(newdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_free_dev;
|
goto err_detach_dev;
|
||||||
|
|
||||||
olddev = i3c_master_search_i3c_dev_duplicate(newdev);
|
olddev = i3c_master_search_i3c_dev_duplicate(newdev);
|
||||||
if (olddev) {
|
if (olddev) {
|
||||||
|
|||||||
Reference in New Issue
Block a user