]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: pxa_camera: add missed tasklet_kill
authorChuhong Yuan <hslester96@gmail.com>
Tue, 3 Dec 2019 11:13:24 +0000 (12:13 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2019 08:23:33 +0000 (09:23 +0100)
This driver forgets to kill tasklet when probe fails and remove.
Add the calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/pxa_camera.c

index 8d47ea0c33f845c40a1d126022b2ce7ccaf23765..43ae645d866b880d0ef3a907a81664dab6bceffb 100644 (file)
@@ -2530,6 +2530,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
        v4l2_device_unregister(&pcdev->v4l2_dev);
 exit_deactivate:
        pxa_camera_deactivate(pcdev);
+       tasklet_kill(&pcdev->task_eof);
 exit_free_dma:
        dma_release_channel(pcdev->dma_chans[2]);
 exit_free_dma_u:
@@ -2544,6 +2545,7 @@ static int pxa_camera_remove(struct platform_device *pdev)
        struct pxa_camera_dev *pcdev = dev_get_drvdata(&pdev->dev);
 
        pxa_camera_deactivate(pcdev);
+       tasklet_kill(&pcdev->task_eof);
        dma_release_channel(pcdev->dma_chans[0]);
        dma_release_channel(pcdev->dma_chans[1]);
        dma_release_channel(pcdev->dma_chans[2]);