From 59a61e69c4252b4e8ecd15e752b0d2337f0121b7 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Wed, 2 Jun 2021 16:49:35 +0800 Subject: i3c: master: svc: drop free_irq of devm_request_irq allocated irq irq allocated with devm_request_irq() will be freed in devm_irq_release(), using free_irq() in ->remove() will causes a dangling pointer, and a subsequent double free. So remove the free_irq() in svc_i3c_master_remove(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210602084935.3977636-1-yangyingliang@huawei.com --- drivers/i3c/master/svc-i3c-master.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index 1f6ba4221817..eeb49b5d90ef 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -1448,7 +1448,6 @@ static int svc_i3c_master_remove(struct platform_device *pdev) if (ret) return ret; - free_irq(master->irq, master); clk_disable_unprepare(master->pclk); clk_disable_unprepare(master->fclk); clk_disable_unprepare(master->sclk); -- cgit v1.2.3 From 3e5feb11a82945c88a1518fd2682ca8de66c37d3 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Wed, 2 Jun 2021 16:55:44 +0800 Subject: i3c: master: svc: fix doc warning in svc-i3c-master.c Fix the following make W=1 warning: drivers/i3c/master/svc-i3c-master.c:207: warning: expecting prototype for struct svc_i3c_i3c_dev_data. Prototype was for struct svc_i3c_i2c_dev_data instead Signed-off-by: Yang Yingliang Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210602085544.4101980-1-yangyingliang@huawei.com --- drivers/i3c/master/svc-i3c-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index eeb49b5d90ef..879e5a64acaf 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -195,7 +195,7 @@ struct svc_i3c_master { }; /** - * struct svc_i3c_i3c_dev_data - Device specific data + * struct svc_i3c_i2c_dev_data - Device specific data * @index: Index in the master tables corresponding to this device * @ibi: IBI slot index in the master structure * @ibi_pool: IBI pool associated to this device -- cgit v1.2.3