[Skiboot] [PATCH v2 4/5] test-ipmi-hiomap: Fix lpc-read-success

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Apr 8 16:05:40 AEST 2019


Cc: Andrew Jeffery <andrew at aj.id.au>
Cc: skiboot-stable at lists.ozlabs.org
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 libflash/test/test-ipmi-hiomap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c
index b8f24a9b0..abc97779c 100644
--- a/libflash/test/test-ipmi-hiomap.c
+++ b/libflash/test/test-ipmi-hiomap.c
@@ -222,10 +222,12 @@ int64_t lpc_read(enum OpalLPCAddressType addr_type __attribute__((unused)),
 
 static bool lpc_read_success(const uint8_t *buf, size_t len)
 {
-	if (len < 64)
+	if (len < 64) {
 		while (len--)
 			if (*buf++ != 0xaa)
 				return false;
+		return true;
+	}
 
 	for (int i = 0; i < 64; i++)
 		if (buf[i] != 0xaa)
-- 
2.14.3



More information about the Skiboot mailing list