From: Sylwester Nawrocki Date: Sun, 11 Sep 2011 13:36:13 +0000 (-0300) Subject: [media] s5p-fimc: Fix error in the capture subdev deinitialization X-Git-Tag: firefly_0821_release~3680^2~3893^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64c570f505a0eac4914402bb7832d019c44eabd8;p=firefly-linux-kernel-4.4.55.git [media] s5p-fimc: Fix error in the capture subdev deinitialization Make sure the subdev pointer is cleared when the subdev object has been freed. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index c8d91b0cd9bd..382dacd23133 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -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 */