[media] marvell-ccic: control handler fixes
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 5 Mar 2015 15:00:11 +0000 (12:00 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:41:46 +0000 (07:41 -0300)
commit1e4cbe677f596563060709b3af92480f873a0a6e
treefa2326bab1af5e1181c4bc814eee953618277ced
parent2e6e609530a1f4306b8fb3e2c4d6abff9d9be30e
[media] marvell-ccic: control handler fixes

No controls were reported, even though the ov7670 does have controls.

Two reasons for this: the v4l2_ctrl_handler_init() call must come
before the ov7670 is loaded (otherwise the ov7670 won't know that
its controls should be added to the bridge driver), and the
v4l2_ctrl_handler_free() call at the end should only be called if
the ret value is non-zero (otherwise you would just free all the
controls that were just added).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/marvell-ccic/mcam-core.c