From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C4BBC43460 for ; Mon, 17 May 2021 11:07:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CAFF61221 for ; Mon, 17 May 2021 11:07:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236632AbhEQLI1 (ORCPT ); Mon, 17 May 2021 07:08:27 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3716 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236618AbhEQLI0 (ORCPT ); Mon, 17 May 2021 07:08:26 -0400 Received: from dggems702-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FkGVG12vSz16Pn9; Mon, 17 May 2021 19:04:22 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggems702-chm.china.huawei.com (10.3.19.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 17 May 2021 19:07:06 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 17 May 2021 19:07:06 +0800 From: Yang Yingliang To: , CC: Subject: [PATCH -next] bus: qcom: Add missing clk_disable_unprepare() on error path Date: Mon, 17 May 2021 19:09:22 +0800 Message-ID: <20210517110922.474849-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org After calling clk_prepare_enable(), clk_disable_unprepare() need be called when read csindex failed. Fixes: 335a12754808 ("bus: qcom: add EBI2 driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/bus/qcom-ebi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c index 0b8f53a688b8..3cffac13bc5f 100644 --- a/drivers/bus/qcom-ebi2.c +++ b/drivers/bus/qcom-ebi2.c @@ -355,7 +355,7 @@ static int qcom_ebi2_probe(struct platform_device *pdev) ret = of_property_read_u32(child, "reg", &csindex); if (ret) { of_node_put(child); - return ret; + goto err_disable_clk; } if (csindex > 5) { -- 2.25.1