Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a7f102c authored by Arvind Yadav's avatar Arvind Yadav Committed by Dmitry Torokhov
Browse files

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 9ee0a055
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);