Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp318931pxb; Mon, 2 Nov 2020 23:45:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJytOmPYcsxMS9M++hr+KgexXvZ5260bUEMyzXIfPSfViYPSro9YSsphGKw/J9pIFzctiItS X-Received: by 2002:a17:906:2458:: with SMTP id a24mr12477676ejb.20.1604389520404; Mon, 02 Nov 2020 23:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604389520; cv=none; d=google.com; s=arc-20160816; b=LhFLdxqVUwlaeSItVub3u372V6a+1zlBAEQ13CIl4QRtqizFxzxPm4qbq7qXLdkOSS BBlKUVxKY2ltVLhoqKYwp3jgB+yvjKYIC4xMgez65x/+ISHPbYxvFk5LnUE3jDGq8Zhz aICsX68NT/8YmBjJmW01rzmPWQR4nVHo9BQh6aJoSAgvVecQtgH28APsoQH58bXBLOd+ rU4UajmNXGunYjKY4gkFabRaVGMH2EuY1ZEig1wID6QrHOF1g2oPk8mzlqoBkIPwzKJk mwdjbffXsaIUnmyisH+C73Sm1eeZCAD8wEUwcVtpYw7EyEFX8NtGx1D5Q4DoLDjVAO0Z m4EA== 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 :message-id:date:subject:cc:to:from; bh=eJSUzCpkFPsEUeL+2qxld6uBNtGe+R2cUaSw+9xrXRQ=; b=MgU4DgrDqgfrXVO4nowGBJBP0r5p0DYtRcNqXw7bhtSqnx19iHuEvUbvJNNCkmapc+ 3GUVFtIEmHHpPq2+PMXE+nUDq5Ulypnni0/5cPGQR1kMYbVjTlW+4oPbBoCXYUxb2M76 VLZSr1u5YCwCu17NWhsYOymnyNurctghpMTBvRln2O6X4LdHIMRdOYTIAs55x1hHk2ma fBLcBYtHcbrRTS31J+oE45zbLgpIiAjrZlArtKTEnVhuHSW5kmShdJPRtn883sYaTs/F bmCWLEb0lA+qbbh/+DReK3CJDsykl0XsIXAc3+sagoBSeCAJyiubvv8nkGNhrYyA0nQF ok/A== 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 f4si11645245eja.252.2020.11.02.23.44.58; Mon, 02 Nov 2020 23:45:20 -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 S1727686AbgKCHnn (ORCPT + 99 others); Tue, 3 Nov 2020 02:43:43 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7038 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHnn (ORCPT ); Tue, 3 Nov 2020 02:43:43 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CQMGg5mvbzhXkR; Tue, 3 Nov 2020 15:43:39 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 3 Nov 2020 15:43:35 +0800 From: Qinglang Miao To: Mark Brown , Florian Fainelli , CC: , , , Qinglang Miao Subject: [PATCH v2] spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume Date: Tue, 3 Nov 2020 15:49:11 +0800 Message-ID: <20201103074911.195530-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.23.0