diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_device_path.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 04ebb449caa..c135e2883db 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -631,9 +631,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) struct efi_device_path_vendor *dp; struct blk_desc *desc = dev_get_uclass_plat(dev); - dp_fill(buf, dev->parent); - dp = buf; - ++dp; + dp = dp_fill(buf, dev->parent); dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; dp->dp.length = sizeof(*dp) + 1; @@ -649,9 +647,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) struct efi_device_path_vendor *dp; struct blk_desc *desc = dev_get_uclass_plat(dev); - dp_fill(buf, dev->parent); - dp = buf; - ++dp; + dp = dp_fill(buf, dev->parent); dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; dp->dp.length = sizeof(*dp) + 1; @@ -666,9 +662,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) struct efi_device_path_vendor *dp; struct blk_desc *desc = dev_get_uclass_plat(dev); - dp_fill(buf, dev->parent); - dp = buf; - ++dp; + dp = dp_fill(buf, dev->parent); dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR; dp->dp.length = sizeof(*dp) + 1; |