diff options
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9b1e2f5ca630..907b08ddb783 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) | |||
352 | 352 | ||
353 | int r; | 353 | int r; |
354 | 354 | ||
355 | if (d->bdev) | 355 | BUG_ON(d->bdev); |
356 | BUG(); | ||
357 | 356 | ||
358 | bdev = open_by_devnum(dev, d->mode); | 357 | bdev = open_by_devnum(dev, d->mode); |
359 | if (IS_ERR(bdev)) | 358 | if (IS_ERR(bdev)) |
@@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti, | |||
427 | struct dm_dev *dd; | 426 | struct dm_dev *dd; |
428 | unsigned int major, minor; | 427 | unsigned int major, minor; |
429 | 428 | ||
430 | if (!t) | 429 | BUG_ON(!t); |
431 | BUG(); | ||
432 | 430 | ||
433 | if (sscanf(path, "%u:%u", &major, &minor) == 2) { | 431 | if (sscanf(path, "%u:%u", &major, &minor) == 2) { |
434 | /* Extract the major/minor numbers */ | 432 | /* Extract the major/minor numbers */ |