]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()
authorChuhong Yuan <hslester96@gmail.com>
Wed, 3 Jun 2020 16:40:48 +0000 (18:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:16:08 +0000 (08:16 +0200)
[ Upstream commit 4603a5b4a87ccd6fb90cbfa10195291cfcf6ba34 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/marvell-ccic/mcam-core.c

index 803baf97f06e4a4806831fb12f11de0668762e69..6de8b3d99fb9ecc743d8eece7c0de724ff7d0b52 100644 (file)
@@ -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);