summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-01-11 07:06:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-06 09:42:19 -0200
commit248ac368ce4b3cd36515122d888403909d7a2500 (patch)
treeb7685d2ad406aa8f1a50d4bd6975cf283be24288 /drivers/media/platform
parenteb36209297b7aadbd3144c74cb79d35704c3086e (diff)
[media] s5p-fimc: Fix fimc-lite entities deregistration
Clear the proper array when deregistering FIMC-LITE devices. Now fimc[] array is erroneously accessed instead of fimc_lite[] and fimc_md_unregister_entities() function call can result in an oops from NULL pointer dereference, since fmd->fimc[] is cleared earlier. This might happen in normal conditions when the driver's probing is deferred and then retried. 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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-mdevice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c
index f49f6f17a3f7..a17fcb2d5d41 100644
--- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c
+++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c
@@ -472,7 +472,7 @@ static void fimc_md_unregister_entities(struct fimc_md *fmd)
if (fmd->fimc_lite[i] == NULL)
continue;
v4l2_device_unregister_subdev(&fmd->fimc_lite[i]->subdev);
- fmd->fimc[i]->pipeline_ops = NULL;
+ fmd->fimc_lite[i]->pipeline_ops = NULL;
fmd->fimc_lite[i] = NULL;
}
for (i = 0; i < CSIS_MAX_ENTITIES; i++) {