From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C9602907 for ; Sun, 29 May 2022 15:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1653838741; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=daX12GWew3IwCy2KNmUXjEytC9BpO3UdZ4OA9NkkNJQ=; b=VkNQu0/8lYhufkUBrHbwvdLG1P4OU7QAocD+n+MvS9sCVDVAuHtVUDl0e+JILLhQ 3khGf4mMAU9jpkWQhePNdXUyU0f0XQz7RJoSWaZvOHoost6JFTXR8x8pI4zWfLvWy09 2c88LvaRZAvqQCA0KziiAk1HDoWXNzSmrGai4Wp0= Received: from localhost.localdomain (81.71.33.115 [81.71.33.115]) by mx.zoho.com.cn with SMTPS id 1653838739745377.08340585932433; Sun, 29 May 2022 23:38:59 +0800 (CST) From: Chengguang Xu To: netdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-scsi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org Cc: Chengguang Xu Message-ID: <20220529153456.4183738-5-cgxu519@mykernel.net> Subject: [PATCH 4/6] drm/exynos: fix missing resource cleanup in error case Date: Sun, 29 May 2022 23:34:54 +0800 X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220529153456.4183738-1-cgxu519@mykernel.net> References: <20220529153456.4183738-1-cgxu519@mykernel.net> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Fix missing resource cleanup(when '(--i) =3D=3D 0') for error case in gsc_runtime_resume(). Signed-off-by: Chengguang Xu --- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exyn= os/exynos_drm_gsc.c index 964dceb28c1e..68ea92742b06 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -1342,7 +1342,7 @@ static int __maybe_unused gsc_runtime_resume(struct d= evice *dev) =09for (i =3D 0; i < ctx->num_clocks; i++) { =09=09ret =3D clk_prepare_enable(ctx->clocks[i]); =09=09if (ret) { -=09=09=09while (--i > 0) +=09=09=09while (--i >=3D 0) =09=09=09=09clk_disable_unprepare(ctx->clocks[i]); =09=09=09return ret; =09=09} --=20 2.27.0