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: 8896671 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6611DBF29F for ; Thu, 21 Apr 2016 07:05:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 935792026F for ; Thu, 21 Apr 2016 07:05:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B555620218 for ; Thu, 21 Apr 2016 07:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbcDUHFG (ORCPT ); Thu, 21 Apr 2016 03:05:06 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:34658 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618AbcDUHFC (ORCPT ); Thu, 21 Apr 2016 03:05:02 -0400 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>; Thu, 21 Apr 2016 08:04:59 +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 Cc: Javier Martinez Canillas , Bartlomiej Zolnierkiewicz 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= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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