Skip to content
/ linux Public

Commit 689d859

Browse files
nxpfrankliSasha Levin
authored andcommitted
i3c: master: svc: Initialize 'dev' to NULL in svc_i3c_master_ibi_isr()
[ Upstream commit 3c9ffb4 ] Initialize the 'dev' pointer to NULL in svc_i3c_master_ibi_isr() and add a NULL check in the error path. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202512131016.YCKIsDXM-lkp@intel.com/ Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20251215200852.3079073-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d209eba commit 689d859

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
426426
{
427427
struct svc_i3c_master *master = container_of(work, struct svc_i3c_master, ibi_work);
428428
struct svc_i3c_i2c_dev_data *data;
429+
struct i3c_dev_desc *dev = NULL;
429430
unsigned int ibitype, ibiaddr;
430-
struct i3c_dev_desc *dev;
431431
u32 status, val;
432432
int ret;
433433

@@ -511,7 +511,7 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
511511
* for the slave to interrupt again.
512512
*/
513513
if (svc_i3c_master_error(master)) {
514-
if (master->ibi.tbq_slot) {
514+
if (master->ibi.tbq_slot && dev) {
515515
data = i3c_dev_get_master_data(dev);
516516
i3c_generic_ibi_recycle_slot(data->ibi_pool,
517517
master->ibi.tbq_slot);

0 commit comments

Comments
 (0)