summaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 67855ba685..aa754b75cd 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -436,6 +436,8 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
int part;
desc = blk_get_dev(dev, simple_strtol(devnr, NULL, 10));
+ if (!desc)
+ return;
part = parse_partnum(devnr);
bootefi_device_path = efi_dp_from_part(desc, part);