Skip to content

Commit 4ce1b97

Browse files
committed
Merge tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
Pull i3c updates from Alexandre Belloni: "Not much this cycle, only two fixes for a rare event" - fix device reattach issues" * tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Remove the wrong place of reattach. i3c: master: Free the old_dyn_addr when reattach.
2 parents b7cef0d + 90f4a09 commit 4ce1b97

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/i3c/master.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,9 @@ static int i3c_master_reattach_i3c_dev(struct i3c_dev_desc *dev,
13791379
i3c_bus_set_addr_slot_status(&master->bus,
13801380
dev->info.dyn_addr,
13811381
I3C_ADDR_SLOT_I3C_DEV);
1382+
if (old_dyn_addr)
1383+
i3c_bus_set_addr_slot_status(&master->bus, old_dyn_addr,
1384+
I3C_ADDR_SLOT_FREE);
13821385
}
13831386

13841387
if (master->ops->reattach_i3c_dev) {
@@ -1908,10 +1911,6 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
19081911
i3c_master_free_i3c_dev(olddev);
19091912
}
19101913

1911-
ret = i3c_master_reattach_i3c_dev(newdev, old_dyn_addr);
1912-
if (ret)
1913-
goto err_detach_dev;
1914-
19151914
/*
19161915
* Depending on our previous state, the expected dynamic address might
19171916
* differ:

0 commit comments

Comments
 (0)