From patchwork Tue Mar 13 16:48:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10280169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F375E602BD for ; Tue, 13 Mar 2018 16:59:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E17FF28C6B for ; Tue, 13 Mar 2018 16:59:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D48D428D0F; Tue, 13 Mar 2018 16:59:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6404A28C6B for ; Tue, 13 Mar 2018 16:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=09eaZGNpyVGObgM4QxjT5gEoAvQ2JY7bLlappzuah+A=; b=cZsG/gDAV2JJp78iOAKIP5AdAJ /coWYl0gT7zfmRvj+/IWprJmgxQMudAiXq/rfV8WgEOOe7E4X0oScjtyF0UPvnfTKKqn4AnxKkFHZ rfcmRxHRBfycVWB5Yxp+Fo+eBfHxM4kAvhpDGSOie65t/F+MscgjiCUhZ7IXpy9HiVlYenf6beJCe myeMJAes7m3YdJKh8NmDp4xkyGvQITW2h4AWqeAdBfP4dMgZNiUlZaWcWtP+ik4ckWFkiFR6/jwvy aJBlFj3ldvJm60PctLggyP+YJim4QTwAGssbeYQ5yEyXqmqn7Ug7PWiCeeEBrX4M52QJIZ83+ABzA BvH5DQAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1evnGQ-00008q-DO; Tue, 13 Mar 2018 16:59:02 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1evnGM-0008H8-Oi for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Mar 2018 16:58:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zsh7d4YovmWnvRZnRbMhoC+wWeAnHEARNJBKjXab00Q=; b=JRrN4EAjW5M+eYf5KCgDMdyX+ ldYJnRWVcqAdpRmD+x+Bh+PkxYbRQ3wZtkFT/NZYpHH6PfI2zC3VwbB/mGld7Vmsle2mDvJ61jSj6 HhIBsGSaQ+2Y8RN/pddNJjmFTUPSWvzQIkGBO5gd5xSyo0Y7vjNqYOVaHz9gprrUmG6Mu6Bp/3qCi FVAQo3e/M9RwjxQFouh6T17m/F5WixfeFmRQNAXmgTCH1qfP1EVLRkG+SlhLayH2C3wVb+ZL2XSfX LBtw2O+xgDMdS0KaP52GT/yT+nMrKreu3osF/xJwpjLD9nPm1IRYvAvuM5qoOJhzosnkLWDXWC/3N MNuLty+YQ==; Received: from mail.bootlin.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1evn6t-0007cZ-Im for linux-arm-kernel@lists.infradead.org; Tue, 13 Mar 2018 16:49:12 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 6511B20879; Tue, 13 Mar 2018 17:48:59 +0100 (CET) Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 3F4FB20888; Tue, 13 Mar 2018 17:48:48 +0100 (CET) From: Gregory CLEMENT To: Herbert Xu , davem@davemloft.net, linux-crypto@vger.kernel.org, Antoine Tenart , oferh@marvell.com Subject: [PATCH 1/3] crypto: inside-secure - fix clock management Date: Tue, 13 Mar 2018 17:48:40 +0100 Message-Id: <20180313164842.20042-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180313164842.20042-1-gregory.clement@bootlin.com> References: <20180313164842.20042-1-gregory.clement@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180313_164911_632893_B9531F30 X-CRM114-Status: GOOD ( 15.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jason Cooper , Gregory CLEMENT , Omri Itach , stable@vger.kernel.org, Nadav Haklai , Shadi Ammouri , Igal Liberman , Thomas Petazzoni , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Marcin Wojtas , Hanna Hawa , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index 384b4ceb37f0..09adeaa0da6b 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -881,7 +881,7 @@ static int safexcel_probe(struct platform_device *pdev) 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) {