aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-04-08 11:35:40 +0530
committeroohal <oohal@users.noreply.github.com>2019-05-09 17:04:30 +1000
commitc6b0245a6ac57480a7fd6af7540c0bcee9876bb8 (patch)
treec98c0e71166e174a1f660003c76f0389b6a50ac1
parent067695735641179a64b410bfe348831872c87bb0 (diff)
downloadskiboot-c6b0245a6ac57480a7fd6af7540c0bcee9876bb8.zip
skiboot-c6b0245a6ac57480a7fd6af7540c0bcee9876bb8.tar.gz
skiboot-c6b0245a6ac57480a7fd6af7540c0bcee9876bb8.tar.bz2
test-ipmi-hiomap: Fix lpc-read-success
[ Upstream commit 9fd1495fba7a549c6cc1df239b3035750285ed61 ] Cc: Andrew Jeffery <andrew@aj.id.au> Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--libflash/test/test-ipmi-hiomap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c
index b8f24a9..abc9777 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)