From d67591dc22f9a6d41163fb6ba0efce5fa0598830 Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Fri, 8 May 2020 14:50:47 +0900 Subject: [PATCH] cmd: efidebug: fix a wrong handling of arguments Coverity detected a dead code, but actually there is a bug in a check against a number of arguments. So simply fix it. Reported-by: Coverity (CID 300330) Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- cmd/efidebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index d8a76d78a3..5e3bf16573 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -602,7 +602,7 @@ static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag, + sizeof(struct efi_device_path); /* for END */ /* optional data */ - if (argc < 6) + if (argc == 6) lo.optional_data = NULL; else lo.optional_data = (const u8 *)argv[6]; -- 2.25.1