mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
media: stm32: dcmi: unregister notifier on probe failure
commit084973ebd6upstream. dcmi_graph_init() registers the async notifier before dcmi_probe() toggles the reset line. If reset_control_assert() or reset_control_deassert() fails afterwards, probe returns through err_cleanup and the driver core will not call dcmi_remove(). Unregister the notifier before cleaning it up on that error path, matching the successful remove path and the V4L2 async notifier lifetime rules. Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Fixes:d079f94c90("media: platform: Switch to v4l2_async_notifier_add_subdev") Cc: stable@vger.kernel.org [hverkuil: added Fixes tag] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
134c979dd7
commit
37ff63c5d7
@@ -2077,6 +2077,7 @@ static int dcmi_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_cleanup:
|
||||
v4l2_async_nf_unregister(&dcmi->notifier);
|
||||
v4l2_async_nf_cleanup(&dcmi->notifier);
|
||||
err_media_entity_cleanup:
|
||||
media_entity_cleanup(&dcmi->vdev->entity);
|
||||
|
||||
Reference in New Issue
Block a user