From: Eric Sesterhenn Date: Sun, 26 Mar 2006 16:22:50 +0000 (+0200) Subject: BUG_ON() Conversion in md/dm-table.c X-Git-Tag: v2.6.17-rc1~480^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=547bc92649345af6014578a64b27cc5787617935;p=linux-2.6 BUG_ON() Conversion in md/dm-table.c this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9b1e2f5ca6..907b08ddb7 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -352,8 +352,7 @@ static int open_dev(struct dm_dev *d, dev_t dev) int r; - if (d->bdev) - BUG(); + BUG_ON(d->bdev); bdev = open_by_devnum(dev, d->mode); if (IS_ERR(bdev)) @@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti, struct dm_dev *dd; unsigned int major, minor; - if (!t) - BUG(); + BUG_ON(!t); if (sscanf(path, "%u:%u", &major, &minor) == 2) { /* Extract the major/minor numbers */