diff mbox series

[18/26] omap3isp: Don't use devm_request_irq()

Message ID 20230201214535.347075-19-sakari.ailus@linux.intel.com
State New
Headers show
Series Media device lifetime management | expand

Commit Message

Sakari Ailus Feb. 1, 2023, 9:45 p.m. UTC
Use request_irq() instead of devm_request_irq(), as a handler set using
devm_request_irq() may still be called once the driver's remove() callback
has been called.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/ti/omap3isp/isp.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
index 9665f1eb345e..904a2c2141f9 100644
--- a/drivers/media/platform/ti/omap3isp/isp.c
+++ b/drivers/media/platform/ti/omap3isp/isp.c
@@ -2024,6 +2024,7 @@  static int isp_remove(struct platform_device *pdev)
 	__omap3isp_get(isp, false);
 	isp_detach_iommu(isp);
 	__omap3isp_put(isp, false);
+	free_irq(isp->irq_num, isp);
 
 	/* May release isp immediately */
 	media_device_put(&isp->media_dev);
@@ -2419,8 +2420,7 @@  static int isp_probe(struct platform_device *pdev)
 	}
 	isp->irq_num = ret;
 
-	if (devm_request_irq(isp->dev, isp->irq_num, isp_isr, IRQF_SHARED,
-			     "OMAP3 ISP", isp)) {
+	if (request_irq(isp->irq_num, isp_isr, IRQF_SHARED, "OMAP3 ISP", isp)) {
 		dev_err(isp->dev, "Unable to request IRQ\n");
 		ret = -EINVAL;
 		goto error_iommu;
@@ -2429,7 +2429,7 @@  static int isp_probe(struct platform_device *pdev)
 	/* Entities */
 	ret = isp_initialize_modules(isp);
 	if (ret < 0)
-		goto error_iommu;
+		goto error_irq;
 
 	ret = isp_register_entities(isp);
 	if (ret < 0)
@@ -2454,6 +2454,8 @@  static int isp_probe(struct platform_device *pdev)
 	isp_unregister_entities(isp);
 error_modules:
 	isp_cleanup_modules(isp);
+error_irq:
+	free_irq(isp->irq_num, isp);
 error_iommu:
 	isp_detach_iommu(isp);
 error_isp: