]> git.karo-electronics.de Git - linux-beck.git/commit
[media] v4l: omap3isp: Fix async notifier registration order
authorSakari Ailus <sakari.ailus@iki.fi>
Tue, 19 May 2015 23:08:05 +0000 (20:08 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 6 Jul 2015 11:25:50 +0000 (08:25 -0300)
commit5d479386983c5f1bb1aff4f88a027b6143f88a39
tree6e52f2e588dd471e0382b7e034cf6fede43b1b06
parent9aee1ae3312daf0de4c9c614680d06d557133317
[media] v4l: omap3isp: Fix async notifier registration order

The async notifier was registered before the v4l2_device was registered and
before the notifier callbacks were set. This could lead to missing the
bound() and complete() callbacks and to attempting to spin_lock() and
uninitialised spin lock.

Also fix unregistering the async notifier in the case of an error --- the
function may not fail anymore after the notifier is registered.

Fixes: da7f3843d2c7 ("[media] omap3isp: Add support for the Device Tree")
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/omap3isp/isp.c