From patchwork Tue Jan 14 09:20:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3484801 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90BC19F169 for ; Tue, 14 Jan 2014 09:20:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EDCD201D5 for ; Tue, 14 Jan 2014 09:20:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D4F9201DD for ; Tue, 14 Jan 2014 09:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751261AbaANJUn (ORCPT ); Tue, 14 Jan 2014 04:20:43 -0500 Received: from jacques.telenet-ops.be ([195.130.132.50]:36092 "EHLO jacques.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbaANJUl (ORCPT ); Tue, 14 Jan 2014 04:20:41 -0500 Received: from ayla.of.borg ([84.193.72.141]) by jacques.telenet-ops.be with bizsmtp id DlLf1n00m32ts5g0JlLfCH; Tue, 14 Jan 2014 10:20:39 +0100 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1W30Ao-0007mh-Ul; Tue, 14 Jan 2014 10:20:39 +0100 From: Geert Uytterhoeven To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH rebased 2/2] spi: rspi: Add missing clk_disable() calls in error and cleanup paths Date: Tue, 14 Jan 2014 10:20:33 +0100 Message-Id: <1389691233-29890-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389691233-29890-1-git-send-email-geert@linux-m68k.org> References: <1389691233-29890-1-git-send-email-geert@linux-m68k.org> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Geert Uytterhoeven Signed-off-by: Geert Uytterhoeven --- Rebased on top of linux-spi/for-next drivers/spi/spi-rspi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 1f8fb32d59fd..cb8a1a4ee700 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -918,6 +918,7 @@ static int rspi_remove(struct platform_device *pdev) struct rspi_data *rspi = platform_get_drvdata(pdev); rspi_release_dma(rspi); + clk_disable(rspi->clk); return 0; } @@ -992,28 +993,30 @@ static int rspi_probe(struct platform_device *pdev) dev_name(&pdev->dev), rspi); if (ret < 0) { dev_err(&pdev->dev, "request_irq error\n"); - goto error1; + goto error2; } rspi->irq = irq; ret = rspi_request_dma(rspi, pdev); if (ret < 0) { dev_err(&pdev->dev, "rspi_request_dma failed.\n"); - goto error2; + goto error3; } ret = devm_spi_register_master(&pdev->dev, master); if (ret < 0) { dev_err(&pdev->dev, "spi_register_master error.\n"); - goto error2; + goto error3; } dev_info(&pdev->dev, "probed\n"); return 0; -error2: +error3: rspi_release_dma(rspi); +error2: + clk_disable(rspi->clk); error1: spi_master_put(master);