aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/sm_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/sm_common.c')
-rw-r--r--drivers/mtd/nand/sm_common.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c
index e8181edebddd..e06b5e5d3287 100644
--- a/drivers/mtd/nand/sm_common.c
+++ b/drivers/mtd/nand/sm_common.c
@@ -42,7 +42,7 @@ static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs)
42{ 42{
43 struct mtd_oob_ops ops; 43 struct mtd_oob_ops ops;
44 struct sm_oob oob; 44 struct sm_oob oob;
45 int ret, error = 0; 45 int ret;
46 46
47 memset(&oob, -1, SM_OOB_SIZE); 47 memset(&oob, -1, SM_OOB_SIZE);
48 oob.block_status = 0x0F; 48 oob.block_status = 0x0F;
@@ -61,11 +61,10 @@ static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs)
61 printk(KERN_NOTICE 61 printk(KERN_NOTICE
62 "sm_common: can't mark sector at %i as bad\n", 62 "sm_common: can't mark sector at %i as bad\n",
63 (int)ofs); 63 (int)ofs);
64 error = -EIO; 64 return -EIO;
65 } else 65 }
66 mtd->ecc_stats.badblocks++;
67 66
68 return error; 67 return 0;
69} 68}
70 69
71static struct nand_flash_dev nand_smartmedia_flash_ids[] = { 70static struct nand_flash_dev nand_smartmedia_flash_ids[] = {