Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp104306imw; Mon, 4 Jul 2022 06:04:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1upU2hpwWh9IpYyjvHg6EmN5819Rcakm3fN/hWblCXC+cZN3ICds4ELd8EoMUstaCwfQkr8 X-Received: by 2002:a05:6402:1910:b0:435:ccca:1d8c with SMTP id e16-20020a056402191000b00435ccca1d8cmr38798819edz.211.1656939891076; Mon, 04 Jul 2022 06:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656939891; cv=none; d=google.com; s=arc-20160816; b=cqTnyA7RMYsMJQ6VZJxo828gcHq57I96T8bsqGAukSCF3Rsv8tIKTdXQSsHbmg9GSH sNNaVgntoRzHb4ifr1mUt7wMd/flDqUtuyPG6efuPKSQkiAg5FJmSziFoIsft8MbSIwJ AIE1WYKRnYOox2GMUEBM0H4aj0t8Xc5ZvnnhQB/m+k6bIcfQhToS7MtDPnSMyMxSJhnq Verm93i5rvaWGM/x+/ipjKfvGKFtLH7DjBeyy0/SryC/3+gr+f7840ApdtqwkCEbJzZD v27Gd8dTB4wtwd1QMHKkIDlxexJ2oHVUQXrDzqwo+YFnC5fLTq/ZuNoBUwfskLFL1qpV Xjhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=BwKhl2RZ9Kvg4C1u92pBf311jz40/4WejZgo+9VKpoI=; b=Thz5pw+wxJnplZlUmNW4ufwaz5nqnP+20WYu8U2MdZUv0JSotEK0hX01MgYIzxdzcz nzfxZjs3C+ZTiCrq5Gz8OrNLUPQp8ImbQPWlkRTS+WKrjNmWSkmJQXhMNdosFdM4HVzx AUQ0/N2ciGm70hrXRjtgbavj3G3HNvQqSGms6K6K/WwNzs2/MoXT5KrX1xI44e0s+erf nPcdtCVjyQVda8yubWLcwOTsuLXLLqFMbdRqBoB0VOrTg8JoJApMAaR0V+f4eGQ1V00I My1Fmxz/FH4ZGd0rNT4hJ/dkteKIsJvv/vEI3LxjprcAgpey49N95oPlrC5Owa0w/9Cm 1Z/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gq6-20020a170906e24600b00726294d9636si32166134ejb.396.2022.07.04.06.04.16; Mon, 04 Jul 2022 06:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234518AbiGDNDt (ORCPT + 99 others); Mon, 4 Jul 2022 09:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234337AbiGDNDt (ORCPT ); Mon, 4 Jul 2022 09:03:49 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B3B5F51; Mon, 4 Jul 2022 06:03:47 -0700 (PDT) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Lc5Y71fJVzkWt9; Mon, 4 Jul 2022 21:01:47 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 4 Jul 2022 21:03:45 +0800 From: Yuan Can To: CC: , , , , Subject: [PATCH -next] crypto: ccree: Add missing clk_disable_unprepare() in cc_pm_resume() Date: Mon, 4 Jul 2022 13:01:45 +0000 Message-ID: <20220704130145.103520-1-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add clk_disable_unprepare() on error path in cc_pm_resume(). Reported-by: Hulk Robot Signed-off-by: Yuan Can --- drivers/crypto/ccree/cc_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index d5421b0c6831..6124fbbbed94 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -41,6 +41,7 @@ static int cc_pm_resume(struct device *dev) /* wait for Cryptocell reset completion */ if (!cc_wait_for_reset_completion(drvdata)) { dev_err(dev, "Cryptocell reset not completed"); + clk_disable_unprepare(drvdata->clk); return -EBUSY; } @@ -48,6 +49,7 @@ static int cc_pm_resume(struct device *dev) rc = init_cc_regs(drvdata); if (rc) { dev_err(dev, "init_cc_regs (%x)\n", rc); + clk_disable_unprepare(drvdata->clk); return rc; } /* check if tee fips error occurred during power down */ -- 2.17.1