From patchwork Sat Oct 29 16:31:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9403983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 32FCB60587 for ; Sat, 29 Oct 2016 16:33:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 222C7290F0 for ; Sat, 29 Oct 2016 16:33:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14764290F5; Sat, 29 Oct 2016 16:33:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 9480E290F0 for ; Sat, 29 Oct 2016 16:33:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0WXu-0002LB-T4; Sat, 29 Oct 2016 16:31:50 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0WXq-0002HR-Dz for linux-arm-kernel@lists.infradead.org; Sat, 29 Oct 2016 16:31:47 +0000 Received: by mail-pf0-x241.google.com with SMTP id n85so4274425pfi.3 for ; Sat, 29 Oct 2016 09:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZrzcV5aFWQlIDpEFEwqS1yIFuVLU3SQ2x6B4IkXoNE0=; b=g7u6r6sjOrZ7fFZUCM8lCY/hVLEj+Vi/9kb2zRhe/bilrLkpW7fkZyEP8hVdehT63j MXk0aWeAKVCeZx79ZOZA9jRvei1ILuZHNxWR9BZRN2utEwAEq8Re57EJ+buLROTgWFZ6 1CTI8Z3ro9VTYtkeCmN2w+RqL6BjJDIbr+dEwT6+BXOFqA4GDF7DMnr05MrrWzYxsCR/ FSEAPSsH3sEYy6ajZBk51vPMdUVMqeFsSXCHxk7I711g8tGQen086450oBXyyE9pAS6U bWASQBjp1QJz3VYMJ3m2X5pJ8XKYQ1K8QFuq5uhYIlFbaOMBj7e/CzPYjgS80PADNBub 3l6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZrzcV5aFWQlIDpEFEwqS1yIFuVLU3SQ2x6B4IkXoNE0=; b=CC5dE6dJ4Tj0jkj8A7XEPZ4pqk3/z4F4dkbZntCOyrTOE3ttL2ruULMA64DpgAIS/h 3ZH0N/gEt2uGKDez4/P9pFJjXKan2P9IhPs9kFO0RBSY5XAZ0LULHridfhJsU3FGSY8f 5W4oHLRtUmPJCN2vikt2n/DFHDE9RYl0IZl0P9tryypCYnMneHTG0D1D/pp+xGb5AzM+ YCN8sOimnsGtAMMtwb/WTCGqIIbB/3QcF9w5c+bWi2wBn82TiMY7aTh2iCl68dT4p2sq zWsFLEwOCUkgbcAjmjWKbUJlqr7vgObn1I8rcXAdewTmPuOxOEp6d0uaN+8ClfLXiQCB V/qA== X-Gm-Message-State: ABUngvfzUtOTLkZpo1a3T56HKf44ALbrBZUe4b8nWo+1vtX7Zc+K0BncM1yZkMlCyxlqXw== X-Received: by 10.99.212.69 with SMTP id i5mr15706940pgj.39.1477758685467; Sat, 29 Oct 2016 09:31:25 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id yu9sm26218430pab.15.2016.10.29.09.31.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 09:31:24 -0700 (PDT) From: Wei Yongjun To: Wolfram Sang , Baruch Siach Subject: [PATCH -next] i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare Date: Sat, 29 Oct 2016 16:31:17 +0000 Message-Id: <1477758677-7831-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161029_093146_607968_A306F1CD X-CRM114-Status: GOOD ( 11.97 ) 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: Wei Yongjun , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun since clk_prepare_enable() is used to get i2c->clk, we should use clk_disable_unprepare() to release it for the error path. Signed-off-by: Wei Yongjun Acked-by: Baruch Siach --- drivers/i2c/busses/i2c-digicolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c index 49f2084..50813a2 100644 --- a/drivers/i2c/busses/i2c-digicolor.c +++ b/drivers/i2c/busses/i2c-digicolor.c @@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev) ret = i2c_add_adapter(&i2c->adap); if (ret < 0) { - clk_unprepare(i2c->clk); + clk_disable_unprepare(i2c->clk); return ret; }