aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 4759d827e8c7..cad8fcc7b239 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -601,6 +601,7 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
601 } 601 }
602 602
603 case MEMGETINFO: 603 case MEMGETINFO:
604 memset(&info, 0, sizeof(info));
604 info.type = mtd->type; 605 info.type = mtd->type;
605 info.flags = mtd->flags; 606 info.flags = mtd->flags;
606 info.size = mtd->size; 607 info.size = mtd->size;
@@ -609,7 +610,6 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
609 info.oobsize = mtd->oobsize; 610 info.oobsize = mtd->oobsize;
610 /* The below fields are obsolete */ 611 /* The below fields are obsolete */
611 info.ecctype = -1; 612 info.ecctype = -1;
612 info.eccsize = 0;
613 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user))) 613 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
614 return -EFAULT; 614 return -EFAULT;
615 break; 615 break;