summaryrefslogtreecommitdiff
path: root/drivers/media/platform/marvell-ccic/mcam-core.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2020-06-03 18:40:48 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-06-23 15:15:14 +0200
commit4603a5b4a87ccd6fb90cbfa10195291cfcf6ba34 (patch)
tree1d141c8b8319e1c518ef92b704bb3f4ce19f5340 /drivers/media/platform/marvell-ccic/mcam-core.c
parent1e8d3bbcdda30973a10d34032401647fc4111747 (diff)
media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()
mccic_register() forgets to cleanup the notifier in its error handler. mccic_shutdown() also misses calling v4l2_async_notifier_cleanup(). Add the missed calls to fix them. Fixes: 3eefe36cc00c ("media: marvell-ccic: use async notifier to get the sensor") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/marvell-ccic/mcam-core.c')
-rw-r--r--drivers/media/platform/marvell-ccic/mcam-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index 09775b6624c6..326e79b8531c 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1940,6 +1940,7 @@ int mccic_register(struct mcam_camera *cam)
out:
v4l2_async_notifier_unregister(&cam->notifier);
v4l2_device_unregister(&cam->v4l2_dev);
+ v4l2_async_notifier_cleanup(&cam->notifier);
return ret;
}
EXPORT_SYMBOL_GPL(mccic_register);
@@ -1961,6 +1962,7 @@ void mccic_shutdown(struct mcam_camera *cam)
v4l2_ctrl_handler_free(&cam->ctrl_handler);
v4l2_async_notifier_unregister(&cam->notifier);
v4l2_device_unregister(&cam->v4l2_dev);
+ v4l2_async_notifier_cleanup(&cam->notifier);
}
EXPORT_SYMBOL_GPL(mccic_shutdown);