* [PATCH 1/1] cmd: efidebug: simplify do_efi_boot_add()
@ 2022-03-23 19:28 Heinrich Schuchardt
0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2022-03-23 19:28 UTC (permalink / raw)
To: u-boot; +Cc: Heinrich Schuchardt, AKASHI Takahiro
When calling efi_dp_from_name() we are not interested in the device part.
Just pass NULL as an argument.
Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
cmd/efidebug.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 51e2850d21..3cc6f2bfcc 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -810,7 +810,7 @@ static int do_efi_boot_add(struct cmd_tbl *cmdtp, int flag,
efi_guid_t guid;
size_t label_len, label_len16;
u16 *label;
- struct efi_device_path *device_path = NULL, *file_path = NULL;
+ struct efi_device_path *file_path = NULL;
struct efi_device_path *fp_free = NULL;
struct efi_device_path *final_fp = NULL;
struct efi_device_path *initrd_dp = NULL;
@@ -865,7 +865,7 @@ static int do_efi_boot_add(struct cmd_tbl *cmdtp, int flag,
/* file path */
ret = efi_dp_from_name(argv[3], argv[4], argv[5],
- &device_path, &fp_free);
+ NULL, &fp_free);
if (ret != EFI_SUCCESS) {
printf("Cannot create device path for \"%s %s\"\n",
argv[3], argv[4]);
@@ -953,7 +953,6 @@ out:
free(data);
efi_free_pool(final_fp);
efi_free_pool(initrd_dp);
- efi_free_pool(device_path);
efi_free_pool(fp_free);
free(lo.label);
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-23 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 19:28 [PATCH 1/1] cmd: efidebug: simplify do_efi_boot_add() Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.