aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-31 14:35:29 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-08-31 14:57:27 -0400
commit8a7f102c4b15940e43b712d35da357a2c05ffb84 (patch)
tree7db498200690d14089939206112e008147e99520 /drivers
parent9ee0a0558819e63d189426c953668fe1ce7cb637 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/tegra-kbc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 0c07e1023a46..edc1385ca00b 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)
370{ 370{
371 unsigned int debounce_cnt; 371 unsigned int debounce_cnt;
372 u32 val = 0; 372 u32 val = 0;
373 int ret;
373 374
374 clk_prepare_enable(kbc->clk); 375 ret = clk_prepare_enable(kbc->clk);
376 if (ret)
377 return ret;
375 378
376 /* Reset the KBC controller to clear all previous status.*/ 379 /* Reset the KBC controller to clear all previous status.*/
377 reset_control_assert(kbc->rst); 380 reset_control_assert(kbc->rst);