aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r--drivers/mtd/mtdchar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index e75ec5fe7760..b45e7747daa3 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -194,7 +194,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t
194 ret = mtd->read_user_prot_reg(mtd, *ppos, len, &retlen, kbuf); 194 ret = mtd->read_user_prot_reg(mtd, *ppos, len, &retlen, kbuf);
195 break; 195 break;
196 default: 196 default:
197 ret = MTD_READ(mtd, *ppos, len, &retlen, kbuf); 197 ret = mtd->read(mtd, *ppos, len, &retlen, kbuf);
198 } 198 }
199 /* Nand returns -EBADMSG on ecc errors, but it returns 199 /* Nand returns -EBADMSG on ecc errors, but it returns
200 * the data. For our userspace tools it is important 200 * the data. For our userspace tools it is important
@@ -205,7 +205,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t
205 if (!ret || (ret == -EBADMSG)) { 205 if (!ret || (ret == -EBADMSG)) {
206 *ppos += retlen; 206 *ppos += retlen;
207 if (copy_to_user(buf, kbuf, retlen)) { 207 if (copy_to_user(buf, kbuf, retlen)) {
208 kfree(kbuf); 208 kfree(kbuf);
209 return -EFAULT; 209 return -EFAULT;
210 } 210 }
211 else 211 else