Received: by 10.213.65.68 with SMTP id h4csp649349imn; Fri, 6 Apr 2018 06:45:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx487IxLQVTkHX4tcqClrzUvSG1/WcCm32S0G3AVNI83ZW5MFRfK3vx9OtST9WhJBSzJJ8JEv X-Received: by 10.101.88.196 with SMTP id e4mr2476727pgu.143.1523022340857; Fri, 06 Apr 2018 06:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022340; cv=none; d=google.com; s=arc-20160816; b=xysAUeQoOyvl7w/GPHVmIOZzQKDpSN1LUd4rir67wtAm0++/pV9HEPRhShfwuZ3l4i a0nF/aUiDo03TOqSHVfl1wZ8R25r8AvBwCZ/p0XeBswz0h2vLRYtO3O/19rQRK2/2WnB FDK1SHSA8zyIvC8YPRID8FT/oLcfOH29g7BxLaJH8B/x2DoLq8sOBKdboPxErk8B2Kfd 2Z4PqT6xJDOjb0gm6PJD1nmW4eZnyJHBQx7J8q0Mw9OTxMetoGVEzl5UX1SF5WQKnoA0 Fa8fcE0oj2YtpJBi/8fFxQA3NqMx8ozJRze99Sdb65e2Qbko0R64NU3Eyp9H+1O/os8V 5x/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=iICVaNRA/ocvaLRfXhE8yiCMA3dEJ0ZEoVKMydcncOo=; b=fWXCn7FE74qb/BjXKmxVkdjwcSd4VE2MGtU4nZEDu8B9yI0P0ZmwY1l2pz4io6VS0T E+2KeqjVxFE70Qx1Qa28TC70LiHILIKFjH6ty7nqrXrBVOlm7qHd+AxkAPn07NiZ/iMr DEb5tUEZxKiVZrvnYhOvIXndFl3mEwKt6+Ir2pJ9D0GHfT6zi93ElKByEt2FBfxCURvP M0AZJo+tkzYkt68NrYvV26KaqrY1NzPXMwOt4yFaoVWU0sG1m9tOFSyGl4SYRomO1GEt 46po1wFk3uLYnx4qiKeX9OqrDphQoL1EcmpwQI3GdNoT1xb07fKKPPZix/6kq4hvjGK8 1ARQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si8062501pld.748.2018.04.06.06.45.27; Fri, 06 Apr 2018 06:45:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756703AbeDFNnQ (ORCPT + 99 others); Fri, 6 Apr 2018 09:43:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37248 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756693AbeDFNnM (ORCPT ); Fri, 6 Apr 2018 09:43:12 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B4AE4DFE; Fri, 6 Apr 2018 13:43:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gregory CLEMENT , Herbert Xu Subject: [PATCH 4.15 51/72] crypto: inside-secure - fix clock management Date: Fri, 6 Apr 2018 15:24:26 +0200 Message-Id: <20180406084353.029795884@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gregory CLEMENT commit f962eb46e7a9b98a58d2483f5eb216e738fec732 upstream. In this driver the clock is got but never put when the driver is removed or if there is an error in the probe. Using the managed version of clk_get() allows to let the kernel take care of it. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -789,7 +789,7 @@ static int safexcel_probe(struct platfor return PTR_ERR(priv->base); } - priv->clk = of_clk_get(dev->of_node, 0); + priv->clk = devm_clk_get(&pdev->dev, NULL); if (!IS_ERR(priv->clk)) { ret = clk_prepare_enable(priv->clk); if (ret) {