Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9043087pxu; Mon, 28 Dec 2020 05:14:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6TJwg6zxF5OfuPTFeelIm5RLsz7xgn26VAJGqUO6dxZQWIl63w/67CFeWpX7hjd4Kot+1 X-Received: by 2002:a17:906:cb86:: with SMTP id mf6mr40689700ejb.57.1609161276779; Mon, 28 Dec 2020 05:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161276; cv=none; d=google.com; s=arc-20160816; b=V6e4o6gsnK6PF/R2AYb6ohILXMjI90jOtamZOw92SDbDn/ofBRpui2bOLZ82pdjbtE JWAmUFg59xho21a4vBehQOXrm4FWuw88/sqkEYAuNcIKRQmh+Gk0PAJOWZkDxRFl3MHS opPyuEiDZksBfpS5p54L5PK+2dakgjwRWrQvwr3SpAegUreqb9G9a7FsZXA1BikdXrSW xYFYe8f4SQb7MFxwpOhWKo8n2+A5Mv3Dbn2HOZwDPR/a+sGCccIPw3gcFBlj0eGxVUOY uSVu0apoLGgGBAQirP9CSu1rEJHXzE4AYnXuXkTerK7OjnckLnltINaJ1ofpSZPuCHlN 3y7A== 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=BgxezHn72+JJ+ub+uEihQg3xUP5ERns06Kz71LQe0nM=; b=cfQiP7QzX76J5/3kbcU8o06dY9aceWG5VSNPPNK60OMq/97eGisCFFxE6YePntqZED eobvy6l4SZ9+df5KyP9mdjdOwIaXdmc9OsAtVo6VR+k/Zoit1n1Al2oeMs4fm2Y1GdfD dl7yNZCIIC19OroTfhv8qRa/jgwyTAbzvhjScCRwj2owwLB8iSRmOjamwHBQpCNrltoL dvbyKHXgfqA6BY9D68bNhegQSmecsSdP6lYVV2YBLAlti0AHZyxi8MjifhZc1ZxdHLWk xzzYbRGSmudcS/o5SSNXqNjpMUwYceJRqS9HfVyfZGoQfcpk8KJybQuMLXxhVyRfnwTN +7Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NlBo35UM; 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 a8si19937687ejx.247.2020.12.28.05.14.12; Mon, 28 Dec 2020 05:14:36 -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=NlBo35UM; 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 S1732091AbgL1NMc (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:40260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732042AbgL1NMY (ORCPT ); Mon, 28 Dec 2020 08:12:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0607E207F7; Mon, 28 Dec 2020 13:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161103; bh=HC7o2PCeOIe++++B9TezS3nAeeucYTwVILTZ2ULRmks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NlBo35UMIsL1pIs2m6pamnrCy/31ZeFwz+/1PbnRzcRYC8VgSHgm9VCMWK+T63OVK +bMcX4xIaU3t+tAgxlh6jrq02stN9cb4mJhTtcK4XLfB97WsNiKqpt7RaVgtWalMO/ uV0tyECKGuzH3l87A93LAH6YXccu2IU/BkvOe+OQ= 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.14 101/242] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe Date: Mon, 28 Dec 2020 13:48:26 +0100 Message-Id: <20201228124909.663950777@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 c376a3ee7c2c3..41c411ee0da5d 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -1071,7 +1071,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); @@ -1180,6 +1180,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