[media] vpif_capture.c: v4l2_device_register() is called too late in vpif_probe()
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 13 Dec 2011 08:44:42 +0000 (05:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jan 2012 13:48:22 +0000 (11:48 -0200)
commitd2f7a1a2467c01b569d2a7fbf10e8894a3f0e496
treef5037f17ea9219456c4608fc4a5af8a3dcb2ddb3
parentbb0a896e3d50833a43f94264ec8e66900b796b8b
[media] vpif_capture.c: v4l2_device_register() is called too late in vpif_probe()

The function v4l2_device_register() is called too late in vpif_probe().
This meant that vpif_obj.v4l2_dev is accessed before it is initialized
which caused a crash.

This used to work in the past, but video_register_device() is now actually
using the v4l2_dev pointer.

Note that vpif_display.c doesn't have this bug, there v4l2_device_register()
is called at the beginning of vpif_probe.

Signed-off-by: Georgios Plakaris <gplakari@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Manjunath Hadli <Manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/davinci/vpif_capture.c