public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: Fix resource leaks
@ 2026-02-26 16:38 Ethan Tidmore
  2026-02-27 18:01 ` Jernej Škrabec
  2026-03-14 13:13 ` Chen-Yu Tsai
  0 siblings, 2 replies; 3+ messages in thread
From: Ethan Tidmore @ 2026-02-26 16:38 UTC (permalink / raw)
  To: wens, mripard, jernej.skrabec, samuel
  Cc: maarten.lankhorst, tzimmermann, airlied, simona, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, Ethan Tidmore

Three clocks are not being released in devm_regmap_init_mmio() error
path.

Add proper goto and set ret to the error code.

Fixes: 8270249fbeaf0 ("drm/sun4i: backend: Create regmap after access is possible")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_backend.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index 6391bdc94a5c..e989f75c09b7 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -881,7 +881,8 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
 						     &sun4i_backend_regmap_config);
 	if (IS_ERR(backend->engine.regs)) {
 		dev_err(dev, "Couldn't create the backend regmap\n");
-		return PTR_ERR(backend->engine.regs);
+		ret = PTR_ERR(backend->engine.regs);
+		goto err_disable_ram_clk;
 	}
 
 	list_add_tail(&backend->engine.list, &drv->engine_list);
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: Fix resource leaks
  2026-02-26 16:38 [PATCH] drm/sun4i: Fix resource leaks Ethan Tidmore
@ 2026-02-27 18:01 ` Jernej Škrabec
  2026-03-14 13:13 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Jernej Škrabec @ 2026-02-27 18:01 UTC (permalink / raw)
  To: wens, mripard, samuel, Ethan Tidmore
  Cc: maarten.lankhorst, tzimmermann, airlied, simona, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel, Ethan Tidmore

Dne četrtek, 26. februar 2026 ob 17:38:36 Srednjeevropski standardni čas je Ethan Tidmore napisal(a):
> Three clocks are not being released in devm_regmap_init_mmio() error
> path.
> 
> Add proper goto and set ret to the error code.
> 
> Fixes: 8270249fbeaf0 ("drm/sun4i: backend: Create regmap after access is possible")
> Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: Fix resource leaks
  2026-02-26 16:38 [PATCH] drm/sun4i: Fix resource leaks Ethan Tidmore
  2026-02-27 18:01 ` Jernej Škrabec
@ 2026-03-14 13:13 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2026-03-14 13:13 UTC (permalink / raw)
  To: mripard, jernej.skrabec, samuel, Ethan Tidmore
  Cc: maarten.lankhorst, tzimmermann, airlied, simona, dri-devel,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, 26 Feb 2026 10:38:36 -0600, Ethan Tidmore wrote:
> Three clocks are not being released in devm_regmap_init_mmio() error
> path.
> 
> Add proper goto and set ret to the error code.
> 
> 

Applied to drm-misc-next in drm-misc, thanks!

[1/1] drm/sun4i: Fix resource leaks
      commit: 127367ad2e0f4870de60c6d719ae82ecf68d674c

Best regards,
-- 
Chen-Yu Tsai <wens@kernel.org>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-14 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 16:38 [PATCH] drm/sun4i: Fix resource leaks Ethan Tidmore
2026-02-27 18:01 ` Jernej Škrabec
2026-03-14 13:13 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox