u-boot/drivers/input
Heinrich Schuchardt 2d307fb9ed input: avoid NULL dereference
Before using the result of env_get("stdin") we must check if it is NULL.

Avoid #if. This resolves the -Wunused-but-set-variable issue and we don't
need a dummy assignment in the else branch. Anyway this warning is
disabled in the Makefile.

For sake of readability use an early return after the configuration check.

Checking CONFIG_SPL_BUILD is incorrect as env_get() is only defined if
CONFIG_$(SPL_TPL)ENV_SUPPORT=y.

Fixes: 985ca3945f ("spl: input: Allow input in SPL and TPL")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-10-11 10:35:24 -04:00
..
apple_spi_kbd.c input: apple: Add support for Apple SPI keyboard 2022-02-10 16:44:23 -05:00
button_kbd.c input: button_kbd: make driver complementary to gpio buttons 2023-03-30 15:09:59 -04:00
cros_ec_keyb.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
i8042.c input: Flush the keyboard buffer before resetting it 2023-05-11 10:25:29 +08:00
input.c input: avoid NULL dereference 2023-10-11 10:35:24 -04:00
Kconfig input: button_kbd: make driver complementary to gpio buttons 2023-03-30 15:09:59 -04:00
key_matrix.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
keyboard-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
Makefile sh4: Drop unused twl6030 driver 2023-03-02 17:45:57 -05:00
tegra-kbc.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
twl4030.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00