Input: imx_keypad - check for clk_prepare_enable() error
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/1 Input: imx_keypad - check for clk_prepare_enable() error
From: Fabio Estevam <[email protected]>
clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error.
Signed-off-by Fabio Estevam <[email protected]>
--- drivers/input/keyboard/imx_keypad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/input/keyboard/imx_keypad.c +3 -1
@@ -506,7 +506,9 @@ static int imx_keypad_probe(struct platform_device *pdev)input_set_drvdata (input_dev, keypad);/* 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);clk_disable_unprepare (keypad->clk);
Signature · 4 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
clk_prepare_enable()may fail, so we should better check its return value and propagate it in the case of error.Signed-off-by Fabio Estevam <[email protected]>
Applied, thank you.
Quoted 22 lines
--- drivers/input/keyboard/imx_keypad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/input/keyboard/imx_keypad.c +3
-1@@ -506,7 +506,9 @@ static int imx_keypad_probe(struct platform_device *pdev)input_set_drvdata (input_dev, keypad);/* 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);clk_disable_unprepare (keypad->clk);Signature · 1 line
1.9.1
Signature · 3 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in