All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable.
Date: Thu, 31 Aug 2017 11:51:05 -0700	[thread overview]
Message-ID: <20170831185105.GD14370@dtor-ws> (raw)
In-Reply-To: <e18b64df1c144ac6ac05bd16e0d5d0cd59a20d13.1501581502.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Tue, Aug 01, 2017 at 03:32:26PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thank you.

> ---
>  drivers/input/keyboard/tegra-kbc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> index 0c07e10..edc1385 100644
> --- a/drivers/input/keyboard/tegra-kbc.c
> +++ b/drivers/input/keyboard/tegra-kbc.c
> @@ -370,8 +370,11 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)
>  {
>  	unsigned int debounce_cnt;
>  	u32 val = 0;
> +	int ret;
>  
> -	clk_prepare_enable(kbc->clk);
> +	ret = clk_prepare_enable(kbc->clk);
> +	if (ret)
> +		return ret;
>  
>  	/* Reset the KBC controller to clear all previous status.*/
>  	reset_control_assert(kbc->rst);
> -- 
> 1.9.1
> 

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: riyer@nvidia.com, ldewangan@nvidia.com, thierry.reding@gmail.com,
	jonathanh@nvidia.com, linux-input@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable.
Date: Thu, 31 Aug 2017 11:51:05 -0700	[thread overview]
Message-ID: <20170831185105.GD14370@dtor-ws> (raw)
In-Reply-To: <e18b64df1c144ac6ac05bd16e0d5d0cd59a20d13.1501581502.git.arvind.yadav.cs@gmail.com>

On Tue, Aug 01, 2017 at 03:32:26PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied, thank you.

> ---
>  drivers/input/keyboard/tegra-kbc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> index 0c07e10..edc1385 100644
> --- a/drivers/input/keyboard/tegra-kbc.c
> +++ b/drivers/input/keyboard/tegra-kbc.c
> @@ -370,8 +370,11 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)
>  {
>  	unsigned int debounce_cnt;
>  	u32 val = 0;
> +	int ret;
>  
> -	clk_prepare_enable(kbc->clk);
> +	ret = clk_prepare_enable(kbc->clk);
> +	if (ret)
> +		return ret;
>  
>  	/* Reset the KBC controller to clear all previous status.*/
>  	reset_control_assert(kbc->rst);
> -- 
> 1.9.1
> 

-- 
Dmitry

  parent reply	other threads:[~2017-08-31 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 10:02 [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable Arvind Yadav
2017-08-01 10:04 ` [PATCH 2/2] Input: pxa27x_keypad: " Arvind Yadav
2017-08-31 18:50   ` Dmitry Torokhov
     [not found] ` <e18b64df1c144ac6ac05bd16e0d5d0cd59a20d13.1501581502.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-31 18:51   ` Dmitry Torokhov [this message]
2017-08-31 18:51     ` [PATCH 1/2] Input: tegra-kbc: " Dmitry Torokhov

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=20170831185105.GD14370@dtor-ws \
    --to=dmitry.torokhov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.