Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9438608pxu; Mon, 28 Dec 2020 16:34:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXPXyA9fGzt8l5BbMdOBCj1kdgtcqQX62Z5Sln3F4ZFWJLpV8pxZpyaOnlHK0CZapPKLpj X-Received: by 2002:a17:906:edca:: with SMTP id sb10mr44299506ejb.284.1609202044373; Mon, 28 Dec 2020 16:34:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609202044; cv=none; d=google.com; s=arc-20160816; b=uQ5b3rnc5R5cdiyJRKxNI6mqE/I6mDmQ4hDO/yykv2xhg096RaETBjkceAfmfDMZau klI/mkBhsjdI36aibb5YqrbA++3TkDnPrC2FivPR90KfZwdr9TMnDWiNNtvJ7+lQlQyA ZgNGaqH2z07BAmBOpYFBbWlvdFi7gruX8BzCbeiiMFRgHovIJNjOAxhu/ufIEu7RDt7p zwPP1q9v4/3oEjWL7goPGhjvGY4Hh7O4HXrFD0T0p+uR158xLQ5ebyWYvFxw1OqttLUJ dRxBdHnFStacl797vvv7avBCxmxJXTM5LiS61gjeHIsGz6IF+ESR87noIc4L6soTV3ep g7lQ== 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=uGeXYYUnGB6RBlfMYqvbIZag++viOcg8UHYnOJL9UQI=; b=N7XGZzDbJp2fWQv1BBFZ/BQKTUG9+PM8zcLoa15uJqGw2cW6nu0BmMTud9cdF93mP5 L3GqeyBF0HV5RtAUe0KYfrYaX4PZCOlcn50rSNd3A6vc1AHh4aQbLnV/L600FOLPFH3s iib3/sPCxK31+vCDtjGcD7XjrfPCWJ6vENZf2ubTcy8oxVexycznHTTvexoOQ/7byabJ f8ivfRZWSLZW3Y4F3P3YVhvY0y2nvmPwwgtsyYc2+jKr+J3rYtRFyZrkXPgvCnBanChW 5nG7baUlT7XG8DhzHKI1Y0pmxdQYLauMAk9TDfeissiLTDjFMsbV4Yw8HMyESWVe68m7 xR4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EPxKa2cr; 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 dc22si18573950edb.328.2020.12.28.16.33.42; Mon, 28 Dec 2020 16:34:04 -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=EPxKa2cr; 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 S2406762AbgL1PpT (ORCPT + 99 others); Mon, 28 Dec 2020 10:45:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:45502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404680AbgL1Not (ORCPT ); Mon, 28 Dec 2020 08:44:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6768521D94; Mon, 28 Dec 2020 13:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163049; bh=gQdpJhpVLIzKIGZz4KEnBbRyRqQ2h7fUMX7Avs4zgFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EPxKa2cr0onsg9CSheTB36ZA9gm8DlMd4uE6zbqISfkJpEBwcglBZUpfZJ5J+EZG+ UYWTVrMypzr5c6af/fTcXRVVEDX86OqemP6SuTRC3xxOuqyUmvpAh5gqQomWI7fCzR s31IpzoYMk+wJOgEC+fAT21Fb5fgEBDSTbsEdtW0= 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 5.4 152/453] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe Date: Mon, 28 Dec 2020 13:46:28 +0100 Message-Id: <20201228124944.518912982@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124937.240114599@linuxfoundation.org> References: <20201228124937.240114599@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 2f53fbb741001..103e704c14697 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -1157,7 +1157,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); @@ -1267,6 +1267,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