[PATCH v2 1/1] input: avoid NULL dereference

Simon Glass sjg at google.com
Tue Oct 3 01:10:40 CEST 2023


On Mon, 2 Oct 2023 at 16:27, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> 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.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> v2:
>         Avoid #if.
> ---
>  drivers/input/input.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list