FAILED: patch "[PATCH] media: aspeed: fix missing of_reserved_mem_device_release()" failed to apply to 5.15-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 253c8ef7d57da0c74db251f385324faaa5ae2257
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072935-kinfolk-unsightly-e510@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 253c8ef7d57da0c74db251f385324faaa5ae2257 Mon Sep 17 00:00:00 2001
From: David Carlier <[email protected]>
Date: Sat, 28 Mar 2026 11:23:30 +0000
Subject: [PATCH] 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.
drivers/media/platform/aspeed/aspeed-video.c +1 -0
@@ -2343,6 +2343,7 @@ static int aspeed_video_probe(struct platform_device *pdev) rc =aspeed_video_setup_video (video);if (rc) {aspeed_video_free_buf (video, &video->jpeg); +of_reserved_mem_device_release (&pdev->dev);clk_unprepare (video->vclk);clk_unprepare (video->eclk);return rc;
Sasha Levin
maintainerPATCH 1/1 media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
From: David Carlier <[email protected]>
[ Upstream commit 253c8ef7d57da0c74db251f385324faaa5ae2257 ]
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.
--- drivers/media/platform/aspeed-video.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/aspeed-video.c +1 -0
@@ -1724,6 +1724,7 @@ static int aspeed_video_probe(struct platform_device *pdev) rc =aspeed_video_setup_video (video);if (rc) {aspeed_video_free_buf (video, &video->jpeg); +of_reserved_mem_device_release (&pdev->dev);clk_unprepare (video->vclk);clk_unprepare (video->eclk);return rc;
Signature · 1 line
2.53.0