summaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-fimc/fimc-capture.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-07-26 14:59:11 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 21:56:12 +0400
commitbbc5296f20570756ca437587325c785a2d96ea96 (patch)
tree2bee998b4123a9e09bb912327d7bee6a67d1cd8e /drivers/media/platform/s5p-fimc/fimc-capture.c
parent31d34d9bb30fef7aee1800ec63255083dbcdfa83 (diff)
downloadlinux-bbc5296f20570756ca437587325c785a2d96ea96.tar.xz
[media] s5p-fimc: Don't allocate fimc-m2m video device dynamically
There is no need to to dynamically allocate struct video_device for the M2M devices, so embed it instead in driver's private data structure as it is done in case of fimc-capture and fimc-lite, where it solves some bugs on cleanup paths. 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/s5p-fimc/fimc-capture.c')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-capture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
index 5d3a70f5c5ca..40923885977a 100644
--- a/drivers/media/platform/s5p-fimc/fimc-capture.c
+++ b/drivers/media/platform/s5p-fimc/fimc-capture.c
@@ -1663,6 +1663,9 @@ static int fimc_capture_subdev_registered(struct v4l2_subdev *sd)
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
int ret;
+ if (fimc == NULL)
+ return -ENXIO;
+
ret = fimc_register_m2m_device(fimc, sd->v4l2_dev);
if (ret)
return ret;