i3c: master: svc: Initialize 'dev' to NULL in svc_i3c_master_ibi_isr()
Subsystems (3)
Frank Li
maintainerPATCH 1/1 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 <[email protected]>
Signed-off-by Frank Li <[email protected]>
--- drivers/i3c/master/svc-i3c-master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i3c/master/svc-i3c-master.c +2 -2
@@ -533,8 +533,8 @@ static int svc_i3c_master_handle_ibi_won(struct svc_i3c_master *master, u32 mstastatic void svc_i3c_master_ibi_isr (struct svc_i3c_master *master) {struct svc_i3c_i2c_dev_data *data; +struct i3c_dev_desc *dev =NULL ;unsigned int ibitype, ibiaddr; -struct i3c_dev_desc *dev;u32 status, val;int ret;
@@ -627,7 +627,7 @@ static void svc_i3c_master_ibi_isr(struct svc_i3c_master *master)* for the slave to interrupt again. */ if (svc_i3c_master_error (master)) { -if (master->ibi.tbq_slot) { +if (master->ibi.tbq_slot && dev) { data =i3c_dev_get_master_data (dev);i3c_generic_ibi_recycle_slot (data->ibi_pool, master->ibi.tbq_slot);
Signature · 1 line
2.34.1
Quoted 4 lines · Frank Li
Initialize the 'dev' pointer to NULL in
svc_i3c_master_ibi_isr()and add a NULL check in the error path.
Applied, thanks!
[1/1] i3c: master: svc: Initialize 'dev' to NULL in svc_i3c_master_ibi_isr()
https://git.kernel.org/i3c/c/3c9ffb4db787
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com