From patchwork Sat Oct 12 06:32:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3030881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 154EE9F2B7 for ; Sat, 12 Oct 2013 06:32:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E04B20394 for ; Sat, 12 Oct 2013 06:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30E1E2038C for ; Sat, 12 Oct 2013 06:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742Ab3JLGcL (ORCPT ); Sat, 12 Oct 2013 02:32:11 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:50581 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393Ab3JLGcK (ORCPT ); Sat, 12 Oct 2013 02:32:10 -0400 Received: by mail-bk0-f43.google.com with SMTP id mz13so1876410bkb.2 for ; Fri, 11 Oct 2013 23:32:09 -0700 (PDT) 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=goHNf3Dc2vuanaUFqU2uE0tYV9uV8thPdX/ZgW3zjW0=; b=KvKM0IeirvXtyxklumD2y4CBlTxwauainriDR5/5SJqR+i+uFel5NRUeor77sKQzm9 b+9LGXeIUcJPfMt7lvXPSlNniRc25qUuEecA70cXxKA3pJV68am1jpOHCg1Fgiv75u4F H1qHtGvwVq73USykCB9Ng3S2MJB1IPUZJutG6lufruBCfvF8oXlBAcJyje/3HB5Xu8o9 FcD4tEf3nM5mHwIocNm3l7RP7OEP7wmjxQlt3kLOZU9m5KfREEhxpCArtDaK2ATRvRMK 9yEpGLgKJhVSUv9oE652mo4Y+w+QtTx24f3mlbg0h69kFJvS21oBdpoZifQNcOp6hYrA bkTw== MIME-Version: 1.0 X-Received: by 10.205.22.71 with SMTP id qv7mr20810490bkb.20.1381559529397; Fri, 11 Oct 2013 23:32:09 -0700 (PDT) Received: by 10.205.19.10 with HTTP; Fri, 11 Oct 2013 23:32:09 -0700 (PDT) Date: Sat, 12 Oct 2013 14:32:09 +0800 Message-ID: Subject: [PATCH] Input: nspire-keypad - add missing clk_disable_unprepare() on error path From: Wei Yongjun To: dmitry.torokhov@gmail.com, grant.likely@linaro.org, rob.herring@calxeda.com, dt.tangr@gmail.com, yongjun_wei@trendmicro.com.cn, Julia.Lawall@lip6.fr, viresh.kumar@linaro.org Cc: linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 nspire_keypad_open() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/input/keyboard/nspire-keypad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index b3e3eda..85e8d80 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -143,8 +143,10 @@ static int nspire_keypad_open(struct input_dev *input) return error; error = nspire_keypad_chip_init(keypad); - if (error) + if (error) { + clk_disable_unprepare(keypad->clk); return error; + } return 0; }