]> git.ipfire.org Git - thirdparty/linux.git/commit
media: stm32: dcmi: unregister notifier on probe failure
authorMyeonghun Pak <mhun512@gmail.com>
Sun, 26 Apr 2026 12:43:49 +0000 (21:43 +0900)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 5 May 2026 14:57:03 +0000 (16:57 +0200)
commit084973ebd67b28f0945c5d45408f86c58b540110
tree5906044350cd1c2acd71a7efaa8d1e6417edc293
parent2fc030f9ff287efc4510f4ae5efee0f23e64b608
media: stm32: dcmi: unregister notifier on probe failure

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: d079f94c9046 ("media: platform: Switch to v4l2_async_notifier_add_subdev")
Cc: stable@vger.kernel.org
[hverkuil: added Fixes tag]
drivers/media/platform/st/stm32/stm32-dcmi.c