From 81a538a678edf666568ca4adffe074b3dbce6dc3 Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Wed, 27 Jul 2016 18:19:11 +1000 Subject: 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 Signed-off-by: Stewart Smith --- core/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.1