Skip to content

Commit 3448a93

Browse files
Stanley Chualexandrebelloni
authored andcommitted
i3c: master: svc: Recycle unused IBI slot
In svc_i3c_master_handle_ibi(), an IBI slot is fetched from the pool to store the IBI payload. However, when an error condition is encountered, the function returns without recycling the IBI slot, resulting in an IBI slot leak. Fixes: c85e209 ("i3c: master: svc: fix ibi may not return mandatory data byte") Signed-off-by: Stanley Chu <yschu@nuvoton.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250829012309.3562585-3-yschu@nuvoton.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent a7869b0 commit 3448a93

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/i3c/master/svc-i3c-master.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,
417417
SVC_I3C_MSTATUS_COMPLETE(val), 0, 1000);
418418
if (ret) {
419419
dev_err(master->dev, "Timeout when polling for COMPLETE\n");
420+
i3c_generic_ibi_recycle_slot(data->ibi_pool, slot);
420421
return ret;
421422
}
422423

0 commit comments

Comments
 (0)