aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorSimon Glass2015-10-18 21:17:12 -0600
committerSimon Glass2015-11-19 20:13:40 -0700
commit92778b2784e15a1ac88d4cf64a12eee8163b221c (patch)
treef340eddec66cbada4f5c23532bb8e1e1a25b5906 /drivers/input/input.c
parentc9cac4cdce3a2909d878105621abafa38c1ff79d (diff)
input: Return -ENOSPC when there is not space
Return a useful error instead of -1 when something goes wrong. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 007b85524aa..90339357736 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <errno.h>
#include <stdio_dev.h>
#include <input.h>
#include <linux/input.h>
@@ -467,7 +468,7 @@ int input_init(struct input_config *config, int leds)
input_add_table(config, KEY_LEFTCTRL, KEY_RIGHTCTRL,
kbd_ctrl_xlate, ARRAY_SIZE(kbd_ctrl_xlate))) {
debug("%s: Could not add modifier tables\n", __func__);
- return -1;
+ return -ENOSPC;
}
return 0;