summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdoops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdoops.c')
-rw-r--r--drivers/mtd/mtdoops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
index a4c8f67560e0..db8e8272d69b 100644
--- a/drivers/mtd/mtdoops.c
+++ b/drivers/mtd/mtdoops.c
@@ -199,7 +199,7 @@ badblock:
return;
}
- if (mtd->block_markbad && ret == -EIO) {
+ if (mtd_can_have_bb(mtd) && ret == -EIO) {
ret = mtd_block_markbad(mtd, cxt->nextpage * record_size);
if (ret < 0) {
printk(KERN_ERR "mtdoops: block_markbad failed, aborting\n");