media: ov6650: Fix control handler not freed on init error
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Tue, 3 Sep 2019 20:11:37 +0000 (17:11 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 20:26:58 +0000 (17:26 -0300)
commitc404af950d14b71bfbf574a752b6c29d726baaba
treee81ac1cc22410fd02b337df4f1ed9e5d3cc1f94f
parent1b23ee9ccf86217e2e56d6966c7a0679ddc02a04
media: ov6650: Fix control handler not freed on init error

Since commit afd9690c72c3 ("[media] ov6650: convert to the control
framework"), if an error occurs during initialization of a control
handler, resources possibly allocated to the handler are not freed
before device initialiaton is aborted.  Fix it.

Fixes: afd9690c72c3 ("[media] ov6650: convert to the control framework")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov6650.c