From patchwork Thu Apr 21 07:04:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8896731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 85A6B9F6CD for ; Thu, 21 Apr 2016 07:07:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 131FB202DD for ; Thu, 21 Apr 2016 07:07:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 465E520218 for ; Thu, 21 Apr 2016 07:06:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1at8g8-0006wD-4J; Thu, 21 Apr 2016 07:05:32 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1at8fy-0005gU-BV for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2016 07:05:23 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O5Z006GX2CAG0A0@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2016 08:04:58 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-b8-57187b9af5d9 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 68.2A.04866.A9B78175; Thu, 21 Apr 2016 08:04:58 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O5Z007JJ2C76510@eusync4.samsung.com>; Thu, 21 Apr 2016 08:04:58 +0100 (BST) From: Krzysztof Kozlowski To: Kukjin Kim , Krzysztof Kozlowski , Wolfram Sang , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] i2c: s3c2410: Add missing clock unprepare on probe() error path Date: Thu, 21 Apr 2016 09:04:49 +0200 Message-id: <1461222291-5642-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgluLIzCtJLcpLzFFi42I5/e/4Nd1Z1RLhBj/umltsnLGe1eLN2zVM Fq9fGFr0P37NbLHp8TVWi46/XxgtLu+aw2Yx4/w+JouVJ2YxO3B6bFrVyeaxeUm9x5b+u+we fVtWMXqcPPWExePzJrkAtigum5TUnMyy1CJ9uwSujE1Lv7MU/GGr+HfkNEsD40vWLkZODgkB E4n728+yQNhiEhfurWfrYuTiEBJYyihx+/BKZginkUni3/F77CBVbALGEpuXLwGrEhH4wyjx 8/MNJpAEs0CuxL99F4A6ODiEBSIlHr2JBTFZBFQlzvZYg1TwCrhJHN73iQlimZzEyWOTWScw ci9gZFjFKJpamlxQnJSea6RXnJhbXJqXrpecn7uJERI+X3cwLj1mdYhRgINRiYd3g4xEuBBr YllxZe4hRgkOZiUR3vnFQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8M3e9DxESSE8sSc1OTS1I LYLJMnFwSjUwmjbPY7m+SMzoWY9+0D/r0xwO+76YaDZuYAjaO1vAa8vllBNZzttuSkp+s3e9 I/xg0+pMEbs1yfMOPtrg/ZeDd0nnzCc2dltYThtG/dBZtFxdp72Ns8mP99OO0AMlFQIqEVs0 /bWe9Nd9/BZb8/dfSmvIym98yxZMP7BAQqws80HVj8/ZP/UilViKMxINtZiLihMBKaa3YRsC AAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160421_000522_612227_9E167850 X-CRM114-Status: GOOD ( 17.43 ) X-Spam-Score: -7.9 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Javier Martinez Canillas , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 If during probe() the s3c24xx_i2c_init() failed, the clock was left in disabled but prepared state. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- Changes since v1: 1. Add Javier's reviewed-by. --- drivers/i2c/busses/i2c-s3c2410.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 362a6de54833..e9658af36f2e 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1200,6 +1200,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) clk_disable(i2c->clk); if (ret != 0) { dev_err(&pdev->dev, "I2C controller init failed\n"); + clk_unprepare(i2c->clk); return ret; } /* find the IRQ for this unit (note, this relies on the init call to