From patchwork Mon Nov 11 14:23:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3167661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87A9AC045B for ; Mon, 11 Nov 2013 14:24:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7369320251 for ; Mon, 11 Nov 2013 14:24:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24FB8201CB for ; Mon, 11 Nov 2013 14:24:30 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VfsPf-0001EM-Aa; Mon, 11 Nov 2013 14:24:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VfsPc-00083c-TZ; Mon, 11 Nov 2013 14:24:20 +0000 Received: from mail-bk0-f52.google.com ([209.85.214.52]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VfsPa-00083F-4B for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2013 14:24:18 +0000 Received: by mail-bk0-f52.google.com with SMTP id v10so1731811bkz.11 for ; Mon, 11 Nov 2013 06:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=SaauESTW2+nPewB8Y/pQjO3ZqGMzL/pIrWRUGwN3KPw=; b=xriXV2ICTaCOJLWbUUA6YAJPVqY/brDaYADU3hP40VfqMAMujNBR3eKN/2PegYN9tC 5JkzhHebs0HtRAI3S2JiFJaZj1C0xmB5mXV7heLpmHBO02TIPCKlUFJqkMOCD03RKKJZ HNYDyudW6ycUKvkI4cXUbfblXvAo9OSNZkaNiiksUEwJwuYIWL1PDvp7sy58g+Q06l6o Emqm221EwwMFoiXq25UiW6b9AeyqE2iVVS/NBlFzSKQphNJMNqqkO9qKNWQV9yEfAPDB itMnymJGQOoZAa8TcN5kJnVnH3vXxqeosljmBS2zZTucIEL3sRkl/C1+/zqqfSyjOoTC LJRg== MIME-Version: 1.0 X-Received: by 10.205.32.17 with SMTP id si17mr19034bkb.86.1384179830922; Mon, 11 Nov 2013 06:23:50 -0800 (PST) Received: by 10.204.169.136 with HTTP; Mon, 11 Nov 2013 06:23:50 -0800 (PST) Date: Mon, 11 Nov 2013 22:23:50 +0800 Message-ID: Subject: [PATCH -next] tree-wide: add missing clk_disable_unprepare() on error in wmt_i2c_reset_hardware() From: Wei Yongjun To: linux@prisktech.co.nz, wsa@the-dreams.de, grant.likely@linaro.org, rob.herring@calxeda.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131111_092418_288257_4C4E8E8D X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) Cc: yongjun_wei@trendmicro.com.cn, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Wei Yongjun Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/i2c/busses/i2c-wmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c index 31395fa..2c8a3e4 100644 --- a/drivers/i2c/busses/i2c-wmt.c +++ b/drivers/i2c/busses/i2c-wmt.c @@ -349,6 +349,7 @@ static int wmt_i2c_reset_hardware(struct wmt_i2c_dev *i2c_dev) err = clk_set_rate(i2c_dev->clk, 20000000); if (err) { dev_err(i2c_dev->dev, "failed to set clock = 20Mhz\n"); + clk_disable_unprepare(i2c_dev->clk); return err; }