Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724496 > unrolled thread

Re: [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable.

Started byDmitry Torokhov <dmitry.torokhov@gmail.com>
First post2017-08-31 21:00 +0200
Last post2017-08-31 21:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/2] Input: tegra-kbc: Handle return value of  clk_prepare_enable. Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-08-31 21:00 +0200

#1724496 — Re: [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable.

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-08-31 21:00 +0200
SubjectRe: [PATCH 1/2] Input: tegra-kbc: Handle return value of clk_prepare_enable.
Message-ID<ukCR3-Ul-7@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web