From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date: Tue, 24 Sep 2013 02:35:50 +0000 (-0300)
Subject: [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq
X-Git-Tag: firefly_0821_release~176^2~3573^2~1216
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=23c4919c6fd15e76fe245ad0158f8739a3fa0747;p=firefly-linux-kernel-4.4.55.git

[media] marvell-ccic: drop free_irq for devm_request_irq allocated irq

irq allocated with devm_request_irq should not be freed using
free_irq, because doing so causes a dangling pointer, and a
subsequent double free.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
---

diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
index b5a19af5c587..3458fa0e2fd5 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -481,7 +481,6 @@ static int mmpcam_remove(struct mmp_camera *cam)
 	struct mmp_camera_platform_data *pdata;
 
 	mmpcam_remove_device(cam);
-	free_irq(cam->irq, mcam);
 	mccic_shutdown(mcam);
 	mmpcam_power_down(mcam);
 	pdata = cam->pdev->dev.platform_data;