[media] s5p-fimc: Fix error in the capture subdev deinitialization
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Sun, 11 Sep 2011 13:36:13 +0000 (10:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 23:01:35 +0000 (21:01 -0200)
Make sure the subdev pointer is cleared when the subdev object
has been freed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-capture.c

index c8d91b0cd9bdd043e54e2ed47391a5736bda61ad..382dacd23133277524205aaabeb60841c12ebc59 100644 (file)
@@ -1375,7 +1375,7 @@ static void fimc_destroy_capture_subdev(struct fimc_dev *fimc)
        media_entity_cleanup(&sd->entity);
        v4l2_device_unregister_subdev(sd);
        kfree(sd);
-       sd = NULL;
+       fimc->vid_cap.subdev = NULL;
 }
 
 /* Set default format at the sensor and host interface */