Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[sfrench/cifs-2.6.git] / drivers / mtd / mtdconcat.c
index b1bf8c411de78e6c7685d7cd8928e642dd1afeb5..9af840364a74ff849c2aa283b25c0dc6038565a1 100644 (file)
@@ -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;