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>
*/
#include <common.h>
+#include <errno.h>
#include <stdio_dev.h>
#include <input.h>
#include <linux/input.h>
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;