Skip to content

Commit 8a7f102

Browse files
ArvindYadavCsdtor
authored andcommitted
Input: tegra-kbc - handle return value of clk_prepare_enable
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>
1 parent 9ee0a05 commit 8a7f102

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/input/keyboard/tegra-kbc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,11 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)
370370
{
371371
unsigned int debounce_cnt;
372372
u32 val = 0;
373+
int ret;
373374

374-
clk_prepare_enable(kbc->clk);
375+
ret = clk_prepare_enable(kbc->clk);
376+
if (ret)
377+
return ret;
375378

376379
/* Reset the KBC controller to clear all previous status.*/
377380
reset_control_assert(kbc->rst);

0 commit comments

Comments
 (0)