linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: Fix memory leak in rockchip_drm_sys_resume()
@ 2017-09-27 12:26 Jeffy Chen
  2017-09-27 20:27 ` Sean Paul
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffy Chen @ 2017-09-27 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

Free the drm_atomic_state allocated by drm_atomic_helper_suspend().

Fixes: 5a5873830972 ("drm/rockchip: Use atomic PM helpers")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 76d63de5921d..80235b672deb 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -15,6 +15,7 @@
  */
 
 #include <drm/drmP.h>
+#include <drm/drm_atomic.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_cma_helper.h>
@@ -299,6 +300,7 @@ static int rockchip_drm_sys_resume(struct device *dev)
 
 	priv = drm->dev_private;
 	drm_atomic_helper_resume(drm, priv->state);
+	drm_atomic_state_put(priv->state);
 	rockchip_drm_fb_resume(drm);
 	drm_kms_helper_poll_enable(drm);
 
-- 
2.11.0

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

end of thread, other threads:[~2017-10-09  6:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 12:26 [PATCH] drm/rockchip: Fix memory leak in rockchip_drm_sys_resume() Jeffy Chen
2017-09-27 20:27 ` Sean Paul
2017-09-28  3:16   ` jeffy
2017-10-09  6:49     ` jeffy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).