]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLib/UefiShellLib.c
ShellPkg: Fix erroneous Status returned by ShellOpenFileByName()
[mirror_edk2.git] / ShellPkg / Library / UefiShellLib / UefiShellLib.c
index 53f54e1746d48bb1e41f06c288477f227e1f08be..8db18b3b210fa53ac842a9f09cdbb79912962565 100644 (file)
@@ -723,6 +723,9 @@ ShellOpenFileByName(
     Status = gEfiShellProtocol->OpenFileByName(FileName,\r
                                                FileHandle,\r
                                                OpenMode);\r
+    if (EFI_ERROR(Status)) {\r
+      return Status;\r
+    }\r
 \r
     if (mUnicodeCollationProtocol == NULL) {\r
       Status = gBS->LocateProtocol (&gEfiUnicodeCollation2ProtocolGuid, NULL, (VOID**)&mUnicodeCollationProtocol);\r