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 14:46:57 +1000
commit81a538a678edf666568ca4adffe074b3dbce6dc3 (patch)
tree08ae301627ee3d0987b3cb89017f4e5ea7413346
parenta7f9956cff9336a636317f6118691b75bdeba95b (diff)
downloadskiboot-81a538a678edf666568ca4adffe074b3dbce6dc3.zip
skiboot-81a538a678edf666568ca4adffe074b3dbce6dc3.tar.gz
skiboot-81a538a678edf666568ca4adffe074b3dbce6dc3.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>
-rw-r--r--core/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/flash.c b/core/flash.c
index d3bda65..e9c1f7d 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -455,7 +455,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;