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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 307F7C433B4 for ; Fri, 14 May 2021 16:13:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1465B6145B for ; Fri, 14 May 2021 16:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234102AbhENQOX (ORCPT ); Fri, 14 May 2021 12:14:23 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:39574 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233939AbhENQOU (ORCPT ); Fri, 14 May 2021 12:14:20 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 14EGD4eb083303; Fri, 14 May 2021 11:13:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1621008784; bh=ns7MOtljCc4UwNrnl//TwrxMSWqjJNtmke4MoCzwf6I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hI7cs26NfHd1rMR34qcuwuh1uG4IKv587jVZtEEh3VCGmOELsHWSmrYuDEbkCs+Eq rDgSqkVLzScMViDFJX5NNqXXDqLgJIsB0Tuqyj+tHrCQ575XsWfTQAivg53rRm2/s6 p9SZYSHmozqH1S3jM5c2/nWl6LPC8OqpF3O/gF2Q= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 14EGD4Hm065689 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 May 2021 11:13:04 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 14 May 2021 11:13:02 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Fri, 14 May 2021 11:13:02 -0500 Received: from lelv0597.itg.ti.com (lelv0597.itg.ti.com [10.181.64.32]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 14EGD2cP049445; Fri, 14 May 2021 11:13:02 -0500 Received: from localhost ([10.250.35.60]) by lelv0597.itg.ti.com (8.14.7/8.14.7) with ESMTP id 14EGD2kW009636; Fri, 14 May 2021 11:13:02 -0500 From: Suman Anna To: Herbert Xu , "David S. Miller" CC: Deepak Saxena , Tero Kristo , Keerthy , Gowtham Tammana , Vaibhav Gupta , , , Suman Anna Subject: [PATCH 3/6] crypto: sa2ul - Fix pm_runtime enable in sa_ul_probe() Date: Fri, 14 May 2021 11:12:43 -0500 Message-ID: <20210514161246.22517-4-s-anna@ti.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210514161246.22517-1-s-anna@ti.com> References: <20210514161246.22517-1-s-anna@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The pm_runtime APIs added first in commit 7694b6ca649f ("crypto: sa2ul - Add crypto driver") are not unwound properly and was fixed up partially in commit 13343badae09 ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()"). This fixed up the pm_runtime usage count but not the state. Fix this properly. Fixes: 13343badae09 ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()") Signed-off-by: Suman Anna --- drivers/crypto/sa2ul.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index 3d6f0af2f938..a215daedf78a 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -2411,6 +2411,7 @@ static int sa_ul_probe(struct platform_device *pdev) if (ret < 0) { dev_err(&pdev->dev, "%s: failed to get sync: %d\n", __func__, ret); + pm_runtime_disable(dev); return ret; } -- 2.30.1