* [PATCH] media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
@ 2026-03-27 22:08 David Carlier
2026-03-28 11:23 ` [PATCH v2] " David Carlier
0 siblings, 1 reply; 2+ messages in thread
From: David Carlier @ 2026-03-27 22:08 UTC (permalink / raw)
To: eajames, mchehab
Cc: joel, andrew, hverkuil, linux-media, openbmc, linux-arm-kernel,
linux-aspeed, linux-kernel, David Carlier
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: aspeed: Add Aspeed Video Engine driver")
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/media/platform/aspeed/aspeed-video.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 41cb96f60110..a292275f6b7b 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -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;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH v2] media: aspeed: fix missing of_reserved_mem_device_release() on probe failure
2026-03-27 22:08 [PATCH] media: aspeed: fix missing of_reserved_mem_device_release() on probe failure David Carlier
@ 2026-03-28 11:23 ` David Carlier
0 siblings, 0 replies; 2+ messages in thread
From: David Carlier @ 2026-03-28 11:23 UTC (permalink / raw)
To: eajames, mchehab
Cc: joel, andrew, hverkuil, linux-media, openbmc, linux-arm-kernel,
linux-aspeed, linux-kernel, David Carlier
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")
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/media/platform/aspeed/aspeed-video.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 41cb96f60110..a292275f6b7b 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -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;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-28 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 22:08 [PATCH] media: aspeed: fix missing of_reserved_mem_device_release() on probe failure David Carlier
2026-03-28 11:23 ` [PATCH v2] " David Carlier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox