Skip to contentSkip to conversation

media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()

PATCH New Chuhong Yuan 1 participant 1 message Jun 3, 2020 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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")

---
Changes in v2:
- Also add v4l2_async_notifier_cleanup() for mccic_shutdown().
- Modify description.

 drivers/media/platform/marvell-ccic/mcam-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/platform/marvell-ccic/mcam-core.c +2 -0
index 09775b6624c6..326e79b8531c 100644
@@ -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);
 
Signature · 1 line
2.26.2