]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
authorDavid Carlier <devnexen@gmail.com>
Sat, 28 Mar 2026 11:23:30 +0000 (11:23 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 5 May 2026 14:57:02 +0000 (16:57 +0200)
commit253c8ef7d57da0c74db251f385324faaa5ae2257
tree8b7459e508a1f9a523cb9a9f26802c496bc1ec21
parentd1162a5adbb5e95953d460b5bde3a04cd4473fe9
media: aspeed: fix missing of_reserved_mem_device_release() on probe failure

aspeed_video_init() calls of_reserved_mem_device_init() to associate
reserved memory regions with the device. When aspeed_video_setup_video()
subsequently fails in aspeed_video_probe(), the error path frees the
JPEG buffer and unprepares the clocks but does not release the reserved
memory association, leaking the rmem_assigned_device entry on the global
list.

The normal remove path already calls of_reserved_mem_device_release()
correctly; only the probe error path was missing it.

Add the missing of_reserved_mem_device_release() call to the
aspeed_video_setup_video() failure cleanup.

Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/aspeed/aspeed-video.c