aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2016-07-27 18:19:11 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-28 18:57:28 +1000
commit98dbeb835a94a51f3ea8372459128c221ad5e5f2 (patch)
treec6b5e6d6297ed7cb11730c10c6f668271ce6f8ee
parent1e89e2d6f8ee1927bab453de49b1aa68e70aee66 (diff)
downloadskiboot-98dbeb835a94a51f3ea8372459128c221ad5e5f2.zip
skiboot-98dbeb835a94a51f3ea8372459128c221ad5e5f2.tar.gz
skiboot-98dbeb835a94a51f3ea8372459128c221ad5e5f2.tar.bz2
core/flash: Fix passing pointer instead of value
flash_find_subpartition() accepts a pointer to a boolean variable indicating ecc for a region of flash and passes the pointer directly to flash_read_corrected() which actually only wants the value. This has always worked probably because there has always been ECC on sub partitions. How there aren't any warnings triggered by this condition escapes me. Fixes: 6c26bc7 ("libflash: move ffs_flash_read into libflash") Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> (cherry picked from commit 81a538a678edf666568ca4adffe074b3dbce6dc3) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/flash.c b/core/flash.c
index 746db6f..0983c65 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -422,7 +422,7 @@ static int flash_find_subpartition(struct blocklevel_device *bl, uint32_t subid,
/* Get the TOC */
rc = flash_read_corrected(bl, *start, header,
- FLASH_SUBPART_HEADER_SIZE, ecc);
+ FLASH_SUBPART_HEADER_SIZE, *ecc);
if (rc) {
prerror("FLASH: flash subpartition TOC read failed %i\n", rc);
goto end;