[PATCH v2 05/23] mci: imx-esdhc-pbl: fix number of read blocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 drivers/mci/imx-esdhc-pbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;

-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux