Skip to content

Commit

Permalink
i3c: fix missing detach if failed to retrieve i3c dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jisheng Zhang authored and Boris Brezillon committed Jan 25, 2019
1 parent 49a5785 commit 093c61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i3c/master.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 093c61b

Please sign in to comment.