Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9127603pxu; Mon, 28 Dec 2020 07:17:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5ByFoHEnFgMjbwZlZP2T1O0OYPK4Jp0MQaa3oxG0L1nnJv49L3ZHpBlATB5D9CCHAqGQ4 X-Received: by 2002:a17:906:3883:: with SMTP id q3mr41844187ejd.160.1609168658914; Mon, 28 Dec 2020 07:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168658; cv=none; d=google.com; s=arc-20160816; b=OlTWK8ymv/6Iu0mh7YGsoairMLmBXnjDOE/WOIf5Xdkw7R8dwRXJ71swgxqgo+5/vi fA8III/i4zudsq1Bb2u+nnRFL3hEbMyus1RxTP0eWvNV/fMpzaxK9FFkTRnBTQy98Y9I sK0/5HTDXcKuV3pCpDdzLLU3R1rSlHZ7LL4iWoWrXkfl9kfZ2qEBnTCXmXgds3s2RQj7 VNIQ4gvhBgJ5jQo6/MclwnzPp7D2lTXWGXT4Jv4Go979iaTAHDw6V1hl8AvYIw9EEX4i FWUjyQMniMoqCvcbpM86iu4ELvQRe8ZyxfXHJw2Vuvx+vUkEcGJUUjh0cuigyq2s+JQ6 jQRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UzCNVShFk1mtZlGKUeEXle1979lDR7LpO4FjdpOQH8U=; b=VZVnwjJpkHBdfiBrFcU+Nf2Z5F34vh1vTbwk/v9aMfuXAoDlv8VzCTU0OXLvODac4O MwV90vGtzm40mTnAsGsuBheO+xaO1ICHN+L5LPlNrhnknoA6mLhKY/hMiBgdvUKF2hwP IDNvIOoLEdH1qz4Lp43HtmJpFJZUJcO3SyhFuSLh+y1fifFPplOmCqCiT/VKWV6atN2y AibXDVLpy0/yrqSZ7bUZOFdxi0y1IsgipihjpYbrt3e9y5FHPEj3ISUn8O0p8WQmXeCi wE13/aQu/XtPHPaC/8NoaV8Or2rxLNPEbFymQHCJyG7CwobIhajoykXGxOkvfHhK4y1L mr1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YSBAgP7k; 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=pass (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 hd41si20304136ejc.168.2020.12.28.07.17.16; Mon, 28 Dec 2020 07:17:38 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=YSBAgP7k; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504404AbgL1PP5 (ORCPT + 99 others); Mon, 28 Dec 2020 10:15:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:39032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437382AbgL1OEn (ORCPT ); Mon, 28 Dec 2020 09:04:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CE5320731; Mon, 28 Dec 2020 14:04:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164242; bh=KKiQ9OJo1Z2jkY76IyxefMn48f1vFAyzQ8OVpdqHR0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YSBAgP7kUPpIttweqarrBwylRClN1B02wu123i3BUEx+poY4TWkdxCCxknfba69Qw 6zVUJ//5A7MVlr/IlLtAlhqJIiwbBbmqdKHA2BONAHzzTgm1sL5S/lqJ3h38GvaVFf vyVchEYkIDqz2MSQ7WCykNJQII52AjHN+QZEDd74= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qinglang Miao , Mark Brown , Sasha Levin Subject: [PATCH 5.10 081/717] spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume Date: Mon, 28 Dec 2020 13:41:19 +0100 Message-Id: <20201228125024.865394837@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 9bb9ef2b3e5d9d012876e7e2d7757eb30e865bee ] Fix the missing clk_disable_unprepare() before return from bcm63xx_hsspi_resume in the error handling case when fails to prepare and enable bs->pll_clk. Fixes: 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled") Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201103074911.195530-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-bcm63xx-hsspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 9909b18f3c5a5..1f08d7553f079 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -494,8 +494,10 @@ static int bcm63xx_hsspi_resume(struct device *dev) if (bs->pll_clk) { ret = clk_prepare_enable(bs->pll_clk); - if (ret) + if (ret) { + clk_disable_unprepare(bs->clk); return ret; + } } spi_master_resume(master); -- 2.27.0