Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: master: svc: Initialize 'dev' to NULL in svc_i3c_master_ibi_isr()

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>

authored by

Frank Li and committed by
Alexandre Belloni
3c9ffb4d 9904232a

+2 -2
+2 -2
drivers/i3c/master/svc-i3c-master.c
··· 533 533 static void svc_i3c_master_ibi_isr(struct svc_i3c_master *master) 534 534 { 535 535 struct svc_i3c_i2c_dev_data *data; 536 + struct i3c_dev_desc *dev = NULL; 536 537 unsigned int ibitype, ibiaddr; 537 - struct i3c_dev_desc *dev; 538 538 u32 status, val; 539 539 int ret; 540 540 ··· 627 627 * for the slave to interrupt again. 628 628 */ 629 629 if (svc_i3c_master_error(master)) { 630 - if (master->ibi.tbq_slot) { 630 + if (master->ibi.tbq_slot && dev) { 631 631 data = i3c_dev_get_master_data(dev); 632 632 i3c_generic_ibi_recycle_slot(data->ibi_pool, 633 633 master->ibi.tbq_slot);