diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-02-03 04:03:28 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:23:43 -0400 |
commit | 79186876441278e7276d335448a4cb47fc4c1d8e (patch) | |
tree | f6fe4a75cdb7b0f614f1b2b8af25bbbce85568a7 /drivers/mtd/mtdconcat.c | |
parent | c4cc625ea5958d065c21cc0fcea29e9ed8f3d2bc (diff) |
mtd: mtdconcat: return -EOPNOTSUPP if block_markbad is undefined
The main 'mtd_block_markbad()' function returns -EOPNOTSUPP if the
'->block_markbad' method is undefined, and mtdconcat should do the same.
Fix this by simply removing the 'mtd_can_have_bb()' because it is not
really necessary. It could be treated as an optimization, but this function is
expected to be used so rarely that it does not matter.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 5c7eb69c4ed9..d826a8a50e73 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -673,9 +673,6 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
673 | struct mtd_concat *concat = CONCAT(mtd); | 673 | struct mtd_concat *concat = CONCAT(mtd); |
674 | int i, err = -EINVAL; | 674 | int i, err = -EINVAL; |
675 | 675 | ||
676 | if (!mtd_can_have_bb(concat->subdev[0])) | ||
677 | return 0; | ||
678 | |||
679 | if (ofs > mtd->size) | 676 | if (ofs > mtd->size) |
680 | return -EINVAL; | 677 | return -EINVAL; |
681 | 678 | ||