提交 e998200c 编写于 作者: F Fabio Estevam 提交者: Dmitry Torokhov

Input: imx_keypad - check for clk_prepare_enable() error

clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 84c88ef9
...@@ -506,7 +506,9 @@ static int imx_keypad_probe(struct platform_device *pdev) ...@@ -506,7 +506,9 @@ static int imx_keypad_probe(struct platform_device *pdev)
input_set_drvdata(input_dev, keypad); input_set_drvdata(input_dev, keypad);
/* Ensure that the keypad will stay dormant until opened */ /* Ensure that the keypad will stay dormant until opened */
clk_prepare_enable(keypad->clk); error = clk_prepare_enable(keypad->clk);
if (error)
return error;
imx_keypad_inhibit(keypad); imx_keypad_inhibit(keypad);
clk_disable_unprepare(keypad->clk); clk_disable_unprepare(keypad->clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册