Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9124059pxu; Mon, 28 Dec 2020 07:12:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzskUZsGIiMsyWXO5YcvWt+gLS2uv09mEvRnUjSKJwW+KFz0fsvzDfJ3glc+Cb1DE0K1+14 X-Received: by 2002:a17:906:b08f:: with SMTP id x15mr42002696ejy.36.1609168366281; Mon, 28 Dec 2020 07:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168366; cv=none; d=google.com; s=arc-20160816; b=cToPhWN5oeR6bkMnsKQVTZ4yH1i/qbLGYc+Qx4QHuOjZ0dpluLlD+qjnTBxsdKn9mI H4PKOSKYLuJjFCPRauC51RsPV2zFdoiVMKsQp7ZXFX/1oW7pRX78nZsj+lzxFSB3O09/ aDpEp8AXMqpuBl6oCb8iwROr2qH4t2azGP10QY+jdppI0RI0gtrVRRr2uzX1ZXUtxg3U eYwigWrjlN3yIGudfGDhzGtOTsEMDDaEYlpg8VX4s30IkVZltRDQ4qUQwlOEngqvV1rs x9u0ZVl1TU6XkwZ/jLEyspIK1zw5/u7/w5ETZmfsBcVu63AWwxGcJI9x54bh9lkvfuMa q6pg== 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=1PYFgbqKAiIYRRCn/g6uGDzpTnRuvMD8ro0zQ0hp7fo=; b=iNmf/oCA5lbfzFiGmsJ7CCsG0b8DcNTH1IhPhS55awaj/3IKuQ7zGFGdoUQJoaba7T iyxslBuVtB1UTdV4L45w4i07YpjotjuWknnh7oJNL9pgRjsgjq3w8/UdBkVXsUE0sFsA yMdcfUFTedV8xAwyDmw51GyUVO8Fkq3Hqi5v+cqRSbliMkcC+SX5rZ9P7OvegHjyi9JA 5Yl4/xO3UtfiL+RIX2Z0PmplMLgv/IdkwYt0cL/kMYTD/W2QmJvhUF4TQPp+tvb4Mw6O zGLH6YwGdH7KIqvMUzV48mfUBx90TZDevhDvaVEUwtYKhdDiNzivAv8BCgpL0zrp8TPZ s6MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qWhX0VFe; 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 m10si21155662eda.139.2020.12.28.07.12.22; Mon, 28 Dec 2020 07:12:46 -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=qWhX0VFe; 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 S2440659AbgL1PKV (ORCPT + 99 others); Mon, 28 Dec 2020 10:10:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:42080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438462AbgL1OHd (ORCPT ); Mon, 28 Dec 2020 09:07:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1602920715; Mon, 28 Dec 2020 14:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164412; bh=j5V2gvgXdfzE2voLcVnf7hxbYBvEsyTexWFxe1T/87Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qWhX0VFeX2HliF0d3qg1QhE5TBVmzxb0T+tkO5ZM+7h3vHKXNUWbyjYw2XJ1BVoB3 4O//6k0s/mvBEQDuYSBuj0IwdzuvgyLfCZuSFgq78JuCDnCe8R0gZEOOz21/ovqu1D oiIJXyNeeuEzZkU7G0sUNq4XBmpLQcrLn+bjKJvY= 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.10 171/717] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe Date: Mon, 28 Dec 2020 13:42:49 +0100 Message-Id: <20201228125029.152352456@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 4fd14d90cc409..1b1e0ab0a831a 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -1137,7 +1137,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); @@ -1246,6 +1246,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