aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdchar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 1592eac64e57..8c86b802f212 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -553,7 +553,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
553 ops.datbuf = NULL; 553 ops.datbuf = NULL;
554 ops.mode = MTD_OOB_PLACE; 554 ops.mode = MTD_OOB_PLACE;
555 555
556 if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs)) 556 if (ops.ooboffs && ops.ooblen > (mtd->oobsize - ops.ooboffs))
557 return -EINVAL; 557 return -EINVAL;
558 558
559 ops.oobbuf = kmalloc(buf.length, GFP_KERNEL); 559 ops.oobbuf = kmalloc(buf.length, GFP_KERNEL);