If the code eventually returns "Status" anyway, it does not make
sense to explicitely return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <[email protected]>
---
 OvmfPkg/Library/NvVarsFileLib/FsAccess.c | 3 ---
 OvmfPkg/XenBusDxe/XenStore.c             | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c 
b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
index 826901f..cd0bfff 100644
--- a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
+++ b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
@@ -77,9 +77,6 @@ GetNvVarsFile (
                      ),
                    0
                    );
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
 
   return Status;
 }
diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c
index 1666c4b..76b6e29 100644
--- a/OvmfPkg/XenBusDxe/XenStore.c
+++ b/OvmfPkg/XenBusDxe/XenStore.c
@@ -1075,9 +1075,6 @@ XenStoreInit (
 
   /* Initialize the shared memory rings to talk to xenstored */
   Status = XenStoreInitComms (&xs);
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
 
   return Status;
 }
-- 
1.8.3.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to