Blame SOURCES/0023-efiboot-fix-a-bad-error-check.patch

821f82
From 6d87113fc3d9b2b0f520fc97eab9f5a60fda7d30 Mon Sep 17 00:00:00 2001
821f82
From: Peter Jones <pjones@redhat.com>
821f82
Date: Thu, 21 Jun 2018 13:55:45 -0400
821f82
Subject: [PATCH 23/24] efiboot: fix a bad error check
821f82
821f82
Signed-off-by: Peter Jones <pjones@redhat.com>
821f82
---
821f82
 src/linux-acpi.c | 2 +-
821f82
 1 file changed, 1 insertion(+), 1 deletion(-)
821f82
821f82
diff --git a/src/linux-acpi.c b/src/linux-acpi.c
821f82
index 3eac526525f..88f0084a37e 100644
821f82
--- a/src/linux-acpi.c
821f82
+++ b/src/linux-acpi.c
821f82
@@ -93,7 +93,7 @@ hid_err:
821f82
         errno = 0;
821f82
         fbuf = NULL;
821f82
         rc = read_sysfs_file(&fbuf, "%s/firmware_node/uid", path);
821f82
-        if ((rc <= 0 && errno != ENOENT) || fbuf == NULL) {
821f82
+        if ((rc < 0 && errno != ENOENT) || (rc > 0 && fbuf == NULL)) {
821f82
                 efi_error("could not read %s/firmware_node/uid", path);
821f82
                 return -1;
821f82
         }
821f82
-- 
821f82
2.17.1
821f82