Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11812434pjo; Thu, 2 Jan 2020 14:42:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwQaP8x4yWiIqH6VfHUvW6WbavIQNwRFlxRzTEq4CEhCMcu8OLsOPmbwrd3kZToTX+OftA0 X-Received: by 2002:a9d:7f12:: with SMTP id j18mr98225881otq.17.1578004975378; Thu, 02 Jan 2020 14:42:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578004975; cv=none; d=google.com; s=arc-20160816; b=u79sTEPqzGGoqG6oCdlvTbTljb5afRCJiQoLQSm6qQsSSz81UYVB8VIp7fOpGZ2KzY 1cHtJgtPKg5+uubEceikzzUAoYYy9KKp3mVStcoZiMXPjy48yL1S1/QIeb5an9r785HS af8v/vnahXsmfjEDApIOieghnwtOUTYSZszVuxDY2IdyM+0mkaVl6dJ79dhNHLQk9mTl b5LPr10D0tGoCcipj6gI8DgqScpF49ZMvDKSRZ2MKb3EjyZn0oSPcz8+yG4Z7IFa665H mkKf7D9l5nFsk8vq5niXLWXMz/5RYTvu2pT+rCFQ4jT4aTDpwdp6LHFd8nfqiDbuBLfG covg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZN0iDVlEGMOLOLQ2WtPELhPGQpuw5tioyubp8Ap8504=; b=bxKAYRc3Swy7rQ6M0oJjVhEevGfxN5xjOqPbI+kkMpWXrFQr/2poE9nx3I/ydbsH0f QAF9pk9o9qyTvn9IlFCyPQ7zLXH55lt7THhqX8l9Bz/U9nraiWeTC5ZFO36pDr1YQxHR AGww5JfE1Z+WGWoVhdIvX5bKKV5ylhY3Nbf0DG9UJMZAODe37h/kQOgKkl+8yNJ/RyvT 5IQFzQ1KI5uU7HXbJWdMw5cMbjnr4FDoPksb8TTlfB57G6H+j1ttGUk6UesNfIIr969x wBHk7CwHLP4CWmgzuFENGmpmiwhxTc8/Iob/67vtlqr1Z6QTG+MPH/0Ujai8V9DCRcab SSMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mCeSzjsA; 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 i15si28031996otk.120.2020.01.02.14.42.43; Thu, 02 Jan 2020 14:42:55 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=mCeSzjsA; 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 S1731255AbgABWle (ORCPT + 99 others); Thu, 2 Jan 2020 17:41:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:49066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731032AbgABWhE (ORCPT ); Thu, 2 Jan 2020 17:37:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87B2820866; Thu, 2 Jan 2020 22:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004624; bh=MwWttBtNzN/i0lLMDO007EKBFmGopDV8Av0V68y56dM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mCeSzjsAmHElYEidVKVV/6Gtc9yrkhP3Yi6VGMG/3s71kCdhGdABWGatl3ZhVFxFm k8EBNB25JlOxgbTMrrI3kbY4TiCczFxYmnr0F07obIeL8gxD2Xcfv0wSNk4NERo3WA 5W4NXyyd9DmDA0m/MqCU6zH8PkcER0Ftr6W+7tAY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Mark Brown , Sasha Levin Subject: [PATCH 4.4 058/137] spi: tegra20-slink: add missed clk_unprepare Date: Thu, 2 Jan 2020 23:07:11 +0100 Message-Id: <20200102220554.317562031@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan [ Upstream commit 04358e40ba96d687c0811c21d9dede73f5244a98 ] The driver misses calling clk_unprepare in probe failure and remove. Add the calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191115083122.12278-1-hslester96@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-tegra20-slink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index af2880d0c112..cf2a329fd895 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1078,7 +1078,7 @@ static int tegra_slink_probe(struct platform_device *pdev) ret = clk_enable(tspi->clk); if (ret < 0) { dev_err(&pdev->dev, "Clock enable failed %d\n", ret); - goto exit_free_master; + goto exit_clk_unprepare; } spi_irq = platform_get_irq(pdev, 0); @@ -1151,6 +1151,8 @@ exit_free_irq: free_irq(spi_irq, tspi); exit_clk_disable: clk_disable(tspi->clk); +exit_clk_unprepare: + clk_unprepare(tspi->clk); exit_free_master: spi_master_put(master); return ret; @@ -1164,6 +1166,7 @@ static int tegra_slink_remove(struct platform_device *pdev) free_irq(tspi->irq, tspi); clk_disable(tspi->clk); + clk_unprepare(tspi->clk); if (tspi->tx_dma_chan) tegra_slink_deinit_dma_param(tspi, false); -- 2.20.1