mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 17:52:07 +02:00
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>
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <stdio_dev.h>
|
#include <stdio_dev.h>
|
||||||
#include <input.h>
|
#include <input.h>
|
||||||
#include <linux/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,
|
input_add_table(config, KEY_LEFTCTRL, KEY_RIGHTCTRL,
|
||||||
kbd_ctrl_xlate, ARRAY_SIZE(kbd_ctrl_xlate))) {
|
kbd_ctrl_xlate, ARRAY_SIZE(kbd_ctrl_xlate))) {
|
||||||
debug("%s: Could not add modifier tables\n", __func__);
|
debug("%s: Could not add modifier tables\n", __func__);
|
||||||
return -1;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user