Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp335311pxb; Tue, 3 Nov 2020 00:20:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuu/EQQ9E80vUm7rKumfhDf5TTEEfBqjamL9OfyGZc8ap/RIUxLKSMDhaWulDmncDduvw9 X-Received: by 2002:a17:906:2a4b:: with SMTP id k11mr15945231eje.467.1604391646504; Tue, 03 Nov 2020 00:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604391646; cv=none; d=google.com; s=arc-20160816; b=sd79IHRZk13f8izAk00wPdq8H2C2qSxhFlCIN/Pn7xF2a0bBoVHe42+umyZWar/pye 02a02fStXUmcOildA2iHETzQhCX8hOL1Yaa8lFswo6GV+magryY4f+9U6hfJPVOkJJcA l/fdlMoFamoeTtvXktTF5Hy/NKcWYypKJXR9uFfiFOlbWNO2XnYVvZlLTv0QCakGtWbf y3QOHr0Dyyb0jQhCHPTd6jPy7EXgI6cvx5/G4IYuqGTpvd2u726N5gpwZZqfFP4Vnn8T INQJsdQlwNdebnXzyHo9TW0BlUJjvf+Noot37q2MVQxjd67UByZ6PyqinUCP9N3jNF4O fU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=VQKL0Yr807wCgw14k84T4CbErSHyVQc84MaRvmLkh6Q=; b=OfT/z9zg+gky0Rrnex+ja6I59Ino9Z514No5ecsrH1kExMS/39or9oUYH+Nx5A0U50 +E4kdBJtaI5GeikPWPtmvhJ4mHAnsZFLWPl4LjgWePNuiBxhhZv4hfq9BNqpMEDN9Mc4 KoFHXSPWHMPGwCyqWkYHyj+P7Z2+1xD93PQpvPcB1FmKowBOQWTHAdaFe1n0WV9s6Yrx iyGaXVOZR+4mmVh4b/6x3/bYHRQpeA5dCKVYMmaVW6aQ/TT4ly0ksAIpR+5l2if1523O S5agPsbOKhGufZEvgSGA40THFyLH57u9uxn0Agwbt5IqXNRwKb2/63Awq7HE53zy94vC Ms8w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si4441107ejs.232.2020.11.03.00.20.24; Tue, 03 Nov 2020 00:20:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbgKCIS7 (ORCPT + 99 others); Tue, 3 Nov 2020 03:18:59 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7578 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbgKCIS6 (ORCPT ); Tue, 3 Nov 2020 03:18:58 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CQN3K2VvszLt2m; Tue, 3 Nov 2020 16:18:53 +0800 (CST) Received: from [10.174.177.149] (10.174.177.149) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Tue, 3 Nov 2020 16:18:52 +0800 Subject: Re: [PATCH v2] spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume To: Mark Brown , Florian Fainelli , CC: , , References: <20201103074911.195530-1-miaoqinglang@huawei.com> From: Qinglang Miao Message-ID: <0da24e5e-cf85-7994-4429-15ecc9a7cdf7@huawei.com> Date: Tue, 3 Nov 2020 16:18:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20201103074911.195530-1-miaoqinglang@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.149] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/11/3 15:49, Qinglang Miao ะด??: > 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 > --- > 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 9909b18f3..1f08d7553 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); > Hi Mark and Florian, I made a careless mistake for adding v2 as subject-prefix, this patch is the base version actually. Sorry about that. Thanks.