Skip to content

Commit

Permalink
Input: tegra-kbc - handle return value of clk_prepare_enable
Browse files Browse the repository at this point in the history
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Arvind Yadav authored and Dmitry Torokhov committed Aug 31, 2017
1 parent 9ee0a05 commit 8a7f102
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/input/keyboard/tegra-kbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a7f102

Please sign in to comment.