From: Simon Glass Date: Mon, 19 Oct 2015 03:17:12 +0000 (-0600) Subject: input: Return -ENOSPC when there is not space X-Git-Tag: v2016.01-rc2~237 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92778b2784e15a1ac88d4cf64a12eee8163b221c;p=u-boot input: Return -ENOSPC when there is not space Return a useful error instead of -1 when something goes wrong. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/drivers/input/input.c b/drivers/input/input.c index 007b85524a..9033935773 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -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;