summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/pxa27x_keypad.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-09-21 23:18:46 +0200
committerSean Paul <seanpaul@chromium.org>2017-09-21 23:18:46 +0200
commit1ebfc603d046f1dda6507d11803f9b4046cee712 (patch)
tree3be6790f2ce819929b1ccff7993c636e0944705a /drivers/input/keyboard/pxa27x_keypad.c
parentqxl: fix primary surface handling (diff)
parentMerge tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-1ebfc603d046f1dda6507d11803f9b4046cee712.tar.xz
linux-1ebfc603d046f1dda6507d11803f9b4046cee712.zip
Merge remote-tracking branch 'origin/master' into drm-misc-fixes
Pick up 4.14-rc1 Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/input/keyboard/pxa27x_keypad.c')
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 3841fa30db33..d0bdaeadf86d 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -644,9 +644,12 @@ static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
static int pxa27x_keypad_open(struct input_dev *dev)
{
struct pxa27x_keypad *keypad = input_get_drvdata(dev);
-
+ int ret;
/* Enable unit clock */
- clk_prepare_enable(keypad->clk);
+ ret = clk_prepare_enable(keypad->clk);
+ if (ret)
+ return ret;
+
pxa27x_keypad_config(keypad);
return 0;
@@ -683,6 +686,7 @@ static int pxa27x_keypad_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
struct input_dev *input_dev = keypad->input_dev;
+ int ret = 0;
/*
* If the keypad is used as wake up source, the clock is not turned
@@ -695,14 +699,15 @@ static int pxa27x_keypad_resume(struct device *dev)
if (input_dev->users) {
/* Enable unit clock */
- clk_prepare_enable(keypad->clk);
- pxa27x_keypad_config(keypad);
+ ret = clk_prepare_enable(keypad->clk);
+ if (!ret)
+ pxa27x_keypad_config(keypad);
}
mutex_unlock(&input_dev->mutex);
}
- return 0;
+ return ret;
}
#endif