summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdconcat.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-26 18:15:12 +0200
committerAdrian Bunk <bunk@stusta.de>2006-03-26 18:15:12 +0200
commit373ebfbf17a8ecad304f65cb92c4d2d10adc0a19 (patch)
treeb2cc0bd4a1f26f38515476f436d532926b331a85 /drivers/mtd/mtdconcat.c
parent36ddf5bbdea7ba4582abc62f106f0f0e9f0b6b91 (diff)
BUG_ON() Conversion in drivers/mtd/
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-rw-r--r--drivers/mtd/mtdconcat.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index b1bf8c411de7..9af840364a74 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -477,8 +477,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
}
/* must never happen since size limit has been verified above */
- if (i >= concat->num_subdev)
- BUG();
+ BUG_ON(i >= concat->num_subdev);
/* now do the erase: */
err = 0;
@@ -500,8 +499,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
if ((err = concat_dev_erase(subdev, erase))) {
/* sanity check: should never happen since
* block alignment has been checked above */
- if (err == -EINVAL)
- BUG();
+ BUG_ON(err == -EINVAL);
if (erase->fail_addr != 0xffffffff)
instr->fail_addr = erase->fail_addr + offset;
break;