diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-01-11 10:06:28 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-06 11:42:19 (GMT) |
commit | 248ac368ce4b3cd36515122d888403909d7a2500 (patch) | |
tree | b7685d2ad406aa8f1a50d4bd6975cf283be24288 | |
parent | eb36209297b7aadbd3144c74cb79d35704c3086e (diff) | |
download | linux-248ac368ce4b3cd36515122d888403909d7a2500.tar.xz |
[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>
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-mdevice.c | 2 |
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 f49f6f1..a17fcb2 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++) { |