summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2023-03-13 14:41:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-04-04 09:02:27 +0200
commite993e2ac2b82765a18007b8d2181478f3805b1bd (patch)
tree8f9f1e48c14fb6e9567d4f3696e0baf1ca860143
parent7751361db1f5ca5684fac4c220fc2610d4d38795 (diff)
downloadbarebox-e993e2ac2b82765a18007b8d2181478f3805b1bd.tar.gz
mci: imx-esdhc-pbl: fix number of read blocks
We correctly calculate the buffer offset via the ofs variable by taking the offset and the header-entry into account but the actual read is missing this. Fix this by replace the static offset variable with the ofs variable. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230228-v2023-02-0-topic-flexspi-v2-5-3d33126d2434@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mci/imx-esdhc-pbl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 40c2882dc4..0b6ab9b5d0 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -199,7 +199,7 @@ esdhc_load_image(struct fsl_esdhc_host *host, ptrdiff_t address,
buf = (void *)(entry - ofs);
}
- ret = esdhc_read_blocks(host, buf, offset + len);
+ ret = esdhc_read_blocks(host, buf, ofs + len);
if (ret) {
pr_err("Loading image failed with %d\n", ret);
return ret;