Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2641184pxa; Mon, 17 Aug 2020 15:13:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhbnPvzJMxdfqCHedW3MDJQXUSBso/7DcqZWK2GkDK7EJhY4HEtfYUUp+d+0FPgIY5z2nj X-Received: by 2002:aa7:c604:: with SMTP id h4mr17256361edq.336.1597702426292; Mon, 17 Aug 2020 15:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702426; cv=none; d=google.com; s=arc-20160816; b=Ykw9n7VoD31uD3GRm5bWYmweOnLe47LvaB4FR5CsQMfaONqeBsD71+2JaTVqmSliua 33Fv70nPQWcm2kBvvuUi2pComd9FY7MlziiADeBHllFac1CkSQKPkcq04h4OqBV6Piir KGbB1LkIWdosj7PQJH+TuNQKuXkWtiaCCvQTqPRsdAXbL9B8w+djA+/sjXy4WzXQhOC9 O+wgr/xxHy3SRdhss2kgx8HaPCdkUwCce4BYuSAWAIOCLdCS7/aVwOkDudAoFExAklg2 wNifPGB5wLLM1VibTYnq7CKy/D5vestYOmQTpS1IOin9RdLnEZc//GotUm6xDT5BHoiT Smow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2azVYjIUaLJ3S4dDAmXnfa/MuJpzTw7z8SAfdaVvshg=; b=NzIPu1SaOjR73MBOYsaO/ryCUAI3q3Txfun3u4svGumWLmEGWj6sOnpafhpoc9222L Uj8n829Y1b3zBazVIXibci/vOCZbm+3gBqob8TDs7+ZKj3F5PKeQMPFrIz9avFJxTWzz l3mQO85wsm/NbnmWy0zkCX85OJ9huDUKQFtT2Ed0r8EiMq6PPaWQGkSCSJFl/1xlCgI3 FeFCHi+NIkXLT/LQazEjPI6TKE7xJhFP+lI9LYIs+TkXV3mJhyBoOBNtyynX74lJOlAK 9/Moo0Zu2woU7W1OJ4X4f7CfO0/xywUy+LFDf8Hm4FCV9Sv9MZrxdq/G+6LQ9SP/oskf CEmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dOb12HKX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si15729364edj.133.2020.08.17.15.13.22; Mon, 17 Aug 2020 15:13:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dOb12HKX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389154AbgHQQzb (ORCPT + 99 others); Mon, 17 Aug 2020 12:55:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:51462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388258AbgHQQDq (ORCPT ); Mon, 17 Aug 2020 12:03:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 709C820885; Mon, 17 Aug 2020 16:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680225; bh=3KBZakJRxkbbYwWwnCEtdTABw4FSzfAUpMMNQhnP7D0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dOb12HKXOC7xcOOlS94ctEw5/0QkrEsVwZpkX2fdwX4YN/3H0FL1wruGl1hrdySA1 y+jRLhxpN52rTetJr16OvhYVv0ZJjwFttym5R11qkol5fCtXLJhe02zqdecsCsrdbW I+2HnqYu2A2sqd0Hk+SmK2m0HE0tkSVv8y5tWEaU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lubomir Rintel , Lucas Stach , Sasha Levin Subject: [PATCH 5.4 102/270] drm/etnaviv: Fix error path on failure to enable bus clk Date: Mon, 17 Aug 2020 17:15:03 +0200 Message-Id: <20200817143800.863280808@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lubomir Rintel [ Upstream commit f8794feaf65cdc97767604cf864775d20b97f397 ] Since commit 65f037e8e908 ("drm/etnaviv: add support for slave interface clock") the reg clock is enabled before the bus clock and we need to undo its enablement on error. Fixes: 65f037e8e908 ("drm/etnaviv: add support for slave interface clock") Signed-off-by: Lubomir Rintel Signed-off-by: Lucas Stach Signed-off-by: Sasha Levin --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 8a26ea2a53348..85de8551ce866 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1463,7 +1463,7 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu) if (gpu->clk_bus) { ret = clk_prepare_enable(gpu->clk_bus); if (ret) - return ret; + goto disable_clk_reg; } if (gpu->clk_core) { @@ -1486,6 +1486,9 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu) disable_clk_bus: if (gpu->clk_bus) clk_disable_unprepare(gpu->clk_bus); +disable_clk_reg: + if (gpu->clk_reg) + clk_disable_unprepare(gpu->clk_reg); return ret; } -- 2.25.1