Blame SOURCES/0004-libfwup-get_info-return-whatever-a-second-call-to-ge.patch

453bef
From eb99a8ffba4963482b3bda2b37266734a1f6ad78 Mon Sep 17 00:00:00 2001
453bef
From: Peter Jones <pjones@redhat.com>
453bef
Date: Tue, 28 Mar 2017 13:17:42 -0400
453bef
Subject: [PATCH 04/11] libfwup: get_info: return whatever a second call to
453bef
 get_info() gave us
453bef
453bef
When we recurse and try to get a new variable, just exit with the status
453bef
code get_info() gave us on the second pass.
453bef
453bef
Caught by coverity.
453bef
453bef
Signed-off-by: Peter Jones <pjones@redhat.com>
453bef
---
453bef
 linux/libfwup.c | 5 ++---
453bef
 1 file changed, 2 insertions(+), 3 deletions(-)
453bef
453bef
diff --git a/linux/libfwup.c b/linux/libfwup.c
453bef
index fe4ece4..bdb8708 100644
453bef
--- a/linux/libfwup.c
453bef
+++ b/linux/libfwup.c
453bef
@@ -310,10 +310,9 @@ get_err:
453bef
 			return -1;
453bef
 		}
453bef
 		rc = get_info(guid, hw_inst, info);
453bef
-		if (rc < 0) {
453bef
+		if (rc < 0)
453bef
 			efi_error("get_info() failed");
453bef
-			return rc;
453bef
-		}
453bef
+		return rc;
453bef
 	}
453bef
 	local = (update_info *)data;
453bef
 
453bef
-- 
453bef
2.12.2
453bef