Received: by 10.213.65.68 with SMTP id h4csp686642imn; Fri, 6 Apr 2018 07:18:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49MMumaCBFRsHXzF0xyQhvfz8s6A2skqFvqgPtRxXrwHWD1ak91Y79ypMCsxLr8oonGpTbD X-Received: by 2002:a17:902:b7c2:: with SMTP id v2-v6mr22098647plz.190.1523024318429; Fri, 06 Apr 2018 07:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024318; cv=none; d=google.com; s=arc-20160816; b=BtCuqMDcQgbCPQ64styA7/s/xdnnKqymMAfQlEdg6rOVxA/DPaPbk28Lw3TAZgd3kO EqLWkVOXuUC0TJJgfmGlHAtt9Gh71nWeu+H/bclvnlTsCjgxdfvvY5W9f6birJ/ACXYg VTd0IegpbaEDiOwBTO4RtfOacAeWfnwfDlhe5WQIwhFUwmQ2EFooB40XwwpJY8pjqa1p jWdGpq7JWxVPbuUiwgnPpD/XGv5COPVANPxoO/gbLoB0sM81OCy/Sm14sJpGOzU1uw3Y a+MSPTtmQN0beuf8f5wSwp7q7Poenl5WVdLHrDI2699o4U4cNNJQdXQW6ZA7xkobSF4L HKwQ== 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=m9U4Y33q7dXu07VJ3kTzUX6SoLJkoeBBaxDr4rkyolk=; b=vjOooRR/WrfUAPrkktdKTcwEwbdM8hpkNI6V+Swkj3fvFXECc88SD48gWYBTM7aQ9C cDjUGB5Gr0ZAgqscIYABK9hcPVmGm4SafAhARIROlDbV4W9YBVoKJXHqH35XnGeASJgg HGxQzUBk3dhXdVUPVQB5aPYqkN4gC3D+xTO4RzspxdB2O9D6GRTupCl4natTthJVdT89 uVRBitPpTOBi9aTBx3Lgntb+fhagGw5+TDp66CTANsAwrlpCl3ffCNY0qOx05ynClfzT ZYwpF+0VGHYzmj1qTwIfP+5LefjG/i0tc+jLyPwt0nB3jQ6DGSq3NidvDGIcP3bsZvAc tmEQ== 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 s19-v6si4163985plp.558.2018.04.06.07.18.24; Fri, 06 Apr 2018 07:18:38 -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 S932603AbeDFNjS (ORCPT + 99 others); Fri, 6 Apr 2018 09:39:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34250 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932577AbeDFNjQ (ORCPT ); Fri, 6 Apr 2018 09:39:16 -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 36D8ED17; Fri, 6 Apr 2018 13:39:15 +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.14 47/67] crypto: inside-secure - fix clock management Date: Fri, 6 Apr 2018 15:24:17 +0200 Message-Id: <20180406084347.438770647@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084341.225558262@linuxfoundation.org> References: <20180406084341.225558262@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.14-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) {