diff mbox series

[v5,1/1] i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs()

Message ID 20241001162608.224039-1-Frank.Li@nxp.com (mailing list archive)
State In Next, archived
Headers show
Series [v5,1/1] i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs() | expand

Commit Message

Frank Li Oct. 1, 2024, 4:26 p.m. UTC
if (dev->boardinfo && dev->boardinfo->init_dyn_addr)
                                      ^^^ here check "init_dyn_addr"
	i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr, ...)
						             ^^^^
							free "dyn_addr"
Fix copy/paste error "dyn_addr" by replacing it with "init_dyn_addr".

Cc: stable@kernel.org
Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Change from v4 to v5
- none
- just split from big series
https://lore.kernel.org/linux-i3c/20240829-i3c_fix-v4-0-ebcbd5efceba@nxp.com/
that needs more discussion about dt assign-address.

change from v3 to v4
- mention copy/paste error
- Add Miquel's review tag
---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni Oct. 31, 2024, 10:59 p.m. UTC | #1
On Tue, 01 Oct 2024 12:26:08 -0400, Frank Li wrote:
> if (dev->boardinfo && dev->boardinfo->init_dyn_addr)
>                                       ^^^ here check "init_dyn_addr"
> 	i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr, ...)
> 						             ^^^^
> 							free "dyn_addr"
> Fix copy/paste error "dyn_addr" by replacing it with "init_dyn_addr".
> 
> [...]

Applied, thanks!

[1/1] i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs()
      https://git.kernel.org/abelloni/c/3082990592f7

Best regards,
diff mbox series

Patch

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 82f031928e413..402a71313985f 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1417,7 +1417,7 @@  static void i3c_master_put_i3c_addrs(struct i3c_dev_desc *dev)
 					     I3C_ADDR_SLOT_FREE);
 
 	if (dev->boardinfo && dev->boardinfo->init_dyn_addr)
-		i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr,
+		i3c_bus_set_addr_slot_status(&master->bus, dev->boardinfo->init_dyn_addr,
 					     I3C_ADDR_SLOT_FREE);
 }