[media] smiapp: Fix resource management in registration failure
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 19 Sep 2016 21:41:14 +0000 (18:41 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 17:03:04 +0000 (15:03 -0200)
commit997695407512c3d0a7bf2f5e589ab288ac6d0f6b
treee5501a8a2c843564a33cdc78bafbf2328d496d8f
parent231d1a014aeb8c2288316572f2fe876c5145b91c
[media] smiapp: Fix resource management in registration failure

If the registered() callback failed, resources were left unaccounted for.
Fix this, as well as add unregistering the sub-devices in driver
unregistered() callback.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/smiapp/smiapp-core.c