Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: 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,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: nspire-keypad - add missing clk_disable_unprepare() on error path
Date: Tue, 15 Oct 2013 23:55:10 -0700	[thread overview]
Message-ID: <20131016065510.GB15710@core.coreip.homeip.net> (raw)
In-Reply-To: <CAPgLHd9f_4-mtxXKLcL+fiNJw8gdTjU8ZSJtJoSLTW2tSa-N_Q@mail.gmail.com>

On Sat, Oct 12, 2013 at 02:32:09PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add the missing clk_disable_unprepare() before return
> from nspire_keypad_open() in the error handling case.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied, thank you.

> ---
>  drivers/input/keyboard/nspire-keypad.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 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;
>  }
> 

-- 
Dmitry

      reply	other threads:[~2013-10-16  6:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12  6:32 [PATCH] Input: nspire-keypad - add missing clk_disable_unprepare() on error path Wei Yongjun
2013-10-16  6:55 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131016065510.GB15710@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=dt.tangr@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=viresh.kumar@linaro.org \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox