Skip to contentSkip to conversation

media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()

PATCH Superseded Chuhong Yuan 2 participants 2 messages Jun 3, 2020 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()

mccic_register() forgets to cleanup the notifier in its error handler. Add the missed call to fix it.

Fixes 3eefe36cc00c ("media: marvell-ccic: use async notifier to get the sensor")
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/marvell-ccic/mcam-core.c +1 -0
index 09775b6624c6..cf2a0119e679 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);
Signature · 1 line
2.26.2
#1 lore raw

Hi Chuhong,

Thanks for the patch.

Quoted 14 lines · Chuhong Yuan

mccic_register() forgets to cleanup the notifier in its error handler. Add the missed call to fix it.

Fixes 3eefe36cc00c ("media: marvell-ccic: use async notifier to get the sensor")
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/marvell-ccic/mcam-core.c +0 -0
index 09775b6624c6..cf2a0119e679 100644

drivers/media/platform/marvell-ccic/mcam-core.c int mccic_register(struct mcam_camera *cam) · line 1946

Quoted 7 lines
drivers/media/platform/marvell-ccic/mcam-core.c +1 -0
@@ -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);

The same issue appears to be present in the mcam_shutdown(), could you fix that one as well?

Signature · 3 lines
Regards,

Sakari Ailus