Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9183066pxu; Mon, 28 Dec 2020 08:39:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJx69QQHp86Ksb+3Mtdg3TqK6QJh0IyqQ2WyJKngsV7+6h7ejE1o8jBSB7XovC92j0Si8kMV X-Received: by 2002:aa7:ce94:: with SMTP id y20mr42288927edv.361.1609173556246; Mon, 28 Dec 2020 08:39:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173556; cv=none; d=google.com; s=arc-20160816; b=0HNu/nz1VErdZHve0xHJrxgOS8spo2FwWJu+0FEP4flk07A1vDfyNEq4J3itp/qUgF WbIfstNfiCB/UrLyurOQ2XMyofLqApSE3V61Zk2LcAt5FtTvVGneY3H/zSDtTg4n4wmS 4/RQdg+BFax+9G5+c+G4v3g3SeGjT4nkk+jK49hNuQzrf7+l/zX/t2aH7zM8pxn1icRD iRVsjabkoVc+K5gao1B1FS/TmKX/WFW4CJFRSLw9nKYnfxUgDHII0zGYKmcAIG/6ILfq 0200UvsgwGpwF32ARlbtowif188I/BoCfRvX65yPcP59azt3Xatw3U2iTG6mlDMpkYZV kQ3g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lvUtrSzBCvfIoR28h1/wJgsV4uS51NkCoRm3gbKG+VA=; b=guy0pnmwlmsj5ff06eaF1Gdesh3nsBvQYgB3AxWn2Xhv5Z/TmbTCZOh0E1CfKmxMRc iky5Y3iwl9bo+zz1WdIKhZLhZXibQG3++DrVDtQtBPxCU8xKA+pCGCcY/iRHhNQE1Mj4 g6pTLzUEvP/viN6L+C3bXArzmx+FiQ3jgavHaSQOEGO9xgFEK/vg4l0To2GxhoyT0dw4 0uVj7ZNxTdJ6Fp24Kh+nB+WLFatw61Jbfe/GOGJh7e9u9p+p9cb9KBKENTgfswMwV5MV cm+wmuLrpdF+5KRlOdZ7HN2EEdVTs9HPpjQDxc+VqhYur5qE4W9d3eBllJL2FU8Lm2l4 De1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a1AbK0ZS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si19683946edy.281.2020.12.28.08.38.52; Mon, 28 Dec 2020 08:39:16 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a1AbK0ZS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729982AbgL1NCI (ORCPT + 99 others); Mon, 28 Dec 2020 08:02:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:57636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729880AbgL1NBw (ORCPT ); Mon, 28 Dec 2020 08:01:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 98FC2208D5; Mon, 28 Dec 2020 13:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160497; bh=BJQzKBsOh1mZWBXbkvzZnT2M0lHggzmFDtlvtFNHVB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a1AbK0ZSWmX6+GaEOweyDA6P7e5gxjwcVle9o2QmdT62/fdmFOONKUFL7QNtICFGW XdEZ9zclPQp+kryi3k3EtNb6ITM3mc9ayfUXbGAw9twMqKKeu/QnWoyU77GDgAuFqR WDxzy2jMg/w/Efg5A21hU9oMArt7fIgPgaBJktug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Herbert Xu , Sasha Levin Subject: [PATCH 4.9 072/175] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe Date: Mon, 28 Dec 2020 13:48:45 +0100 Message-Id: <20201228124856.733924429@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Qilong [ Upstream commit ff8107200367f4abe0e5bce66a245e8d0f2d229e ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: f7b2b5dd6a62a ("crypto: omap-aes - add error check for pm_runtime_get_sync") Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/omap-aes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index fe32dd95ae4ff..a2d5ba0a0d5a0 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -1172,7 +1172,7 @@ static int omap_aes_probe(struct platform_device *pdev) if (err < 0) { dev_err(dev, "%s: failed to get_sync(%d)\n", __func__, err); - goto err_res; + goto err_pm_disable; } omap_aes_dma_stop(dd); @@ -1257,6 +1257,7 @@ err_engine: omap_aes_dma_cleanup(dd); err_irq: tasklet_kill(&dd->done_task); +err_pm_disable: pm_runtime_disable(dev); err_res: dd = NULL; -- 2.27.0