Patchwork [1/6] mtd: bcm47xxsflash: write number of written bytes

login
register
mail settings
Submitter Hauke Mehrtens
Date Jan. 24, 2013, 4:39 p.m.
Message ID <1359045599-1305-2-git-send-email-hauke@hauke-m.de>
Download mbox | patch
Permalink /patch/215442/
State New
Headers show

Comments

Hauke Mehrtens - Jan. 24, 2013, 4:39 p.m.
The callback assumes the number of read bytes is written to retlen.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/mtd/devices/bcm47xxsflash.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c
index 8fe1a09..61a45cb 100644
--- a/drivers/mtd/devices/bcm47xxsflash.c
+++ b/drivers/mtd/devices/bcm47xxsflash.c
@@ -23,6 +23,7 @@  static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len,
 
 	memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from),
 		      len);
+	*retlen = len;
 
 	return len;
 }