Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752861AbdI0M1R (ORCPT ); Wed, 27 Sep 2017 08:27:17 -0400 Received: from regular1.263xmail.com ([211.150.99.130]:42135 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbdI0M1Q (ORCPT ); Wed, 27 Sep 2017 08:27:16 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <7f6382d906f7d5abb1e8e5e2845e4b8f> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: Jeffy Chen , Mark Yao , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, David Airlie , linux-arm-kernel@lists.infradead.org Subject: [PATCH] drm/rockchip: Fix memory leak in rockchip_drm_sys_resume() Date: Wed, 27 Sep 2017 20:26:42 +0800 Message-Id: <20170927122642.18628-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 32 Free the drm_atomic_state allocated by drm_atomic_helper_suspend(). Fixes: 5a5873830972 ("drm/rockchip: Use atomic PM helpers") Signed-off-by: Jeffy Chen --- 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 +#include #include #include #include @@ -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