Hello Wei Yongjun,

Thanks for finding the issue. It seems the last part code is missed when I 
submitted the patch. Please see the patch we submitted before in [REVIEW PATCH 
V4 07/12] [media] marvell-ccic: switch to resource managed allocation and 
request.

The last part patch is missed:

@@ -474,18 +461,10 @@ out_free:
 static int mmpcam_remove(struct mmp_camera *cam)  {
        struct mcam_camera *mcam = &cam->mcam;
-       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;
-       gpio_free(pdata->sensor_reset_gpio);
-       gpio_free(pdata->sensor_power_gpio);
-       iounmap(cam->power_regs);
-       iounmap(mcam->regs);
-       kfree(cam);
        return 0;
 }

It seems there was some mistake when Albert transferring the submit patch task 
to me. And I did not notice the patch was wrong when submitting the patches. It 
is my fault. I'm sorry for the inconvenient 

Regards,
Libin 

>-----Original Message-----
>From: linux-media-ow...@vger.kernel.org 
>[mailto:linux-media-ow...@vger.kernel.org] On
>Behalf Of Jonathan Corbet
>Sent: Wednesday, September 25, 2013 3:12 PM
>To: Wei Yongjun
>Cc: m.che...@samsung.com; yongjun_...@trendmicro.com.cn; linux-
>me...@vger.kernel.org; Libin Yang
>Subject: Re: [PATCH] [media] marvell-ccic: drop free_irq for devm_request_irq 
>allocated irq
>
>On Tue, 24 Sep 2013 10:35:50 +0800
>Wei Yongjun <weiyj...@gmail.com> wrote:
>
>> 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.
>
>Makes sense.
>
>Acked-by: Jonathan Corbet <cor...@lwn.net>
>
>jon
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media" in the 
>body of a message
>to majord...@vger.kernel.org More majordomo info at  
>http://vger.kernel.org/majordomo-
>info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to