From patchwork Wed Apr 20 09:24:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8887441 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 E173C9F1C1 for ; Wed, 20 Apr 2016 09:25:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D60F42024C for ; Wed, 20 Apr 2016 09:25:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 023222013A for ; Wed, 20 Apr 2016 09:25:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591AbcDTJZI (ORCPT ); Wed, 20 Apr 2016 05:25:08 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:21436 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752993AbcDTJZG (ORCPT ); Wed, 20 Apr 2016 05:25:06 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O5X00FB8E5QQW20@mailout3.w1.samsung.com>; Wed, 20 Apr 2016 10:25:02 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-c9-57174aeed389 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 90.41.04866.EEA47175; Wed, 20 Apr 2016 10:25:02 +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 <0O5X00BVNE5NS540@eusync4.samsung.com>; Wed, 20 Apr 2016 10:25:02 +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 1/3] i2c: s3c2410: Add missing clock unprepare on probe() error path Date: Wed, 20 Apr 2016 11:24:50 +0200 Message-id: <1461144292-22141-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e/4Nd13XuLhBjcemVhsnLGe1eLN2zVM Fq9fGFr0P37NbLHp8TVWi46/XxgtLu+aw2Yx4/w+JouVJ2YxO3B6bFrVyeaxeUm9x5b+u+we fVtWMXqcPPWExePzJrkAtigum5TUnMyy1CJ9uwSujGtTpQqa2Cr+LZjG3sDYwtrFyMkhIWAi sW/RdyYIW0ziwr31bF2MXBxCAksZJS78eMIM4TQySdzteMYCUsUmYCyxefkSsCoRgT+MEj8/ 3wBrZxbIlfi37wIziC0sECbR3L8VzGYRUJU487YXbB2vgLvE7U8XoNbJSZw8Npl1AiP3AkaG VYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghAfR1B+PSY1aHGAU4GJV4eFcUiYYLsSaWFVfm HmKU4GBWEuHtcBMPF+JNSaysSi3Kjy8qzUktPsQozcGiJM47c9f7ECGB9MSS1OzU1ILUIpgs EwenVANjz+VPiu/r/HW7lQ93lwTm3MxcIBKz0Vj9wrP/mREW9w0nBJhb8MtKTxPn/ed0gK9Z TzHPn/PwiVMtnoty95cbHZ7RvHZ5VFvrleSjEXrzt52/xiZ6cwtXbHnZ2vKXjkUKN06qSZp2 5Vde/jV9K/fMT/3HbN45R306JXNKMaou52l2x7HO5dlKLMUZiYZazEXFiQB62EiuHAIAAA== 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 --- 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