diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-01 01:28:11 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-04-01 01:28:11 +0200 |
commit | 3a8dc8930eab1209fd5063f6646a98e58a796eeb (patch) | |
tree | 4877f3523fc90d93f4fab720f9729c48ff1317c4 /drivers/s390/char/tape_block.c | |
parent | BUG_ON() Conversion in drivers/s390/block/dasd_erp.c (diff) | |
download | linux-3a8dc8930eab1209fd5063f6646a98e58a796eeb.tar.xz linux-3a8dc8930eab1209fd5063f6646a98e58a796eeb.zip |
BUG_ON() Conversion in drivers/s390/char/tape_block.c
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/s390/char/tape_block.c')
-rw-r--r-- | drivers/s390/char/tape_block.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 5ced2725d6c7..5c65cf3e5cc0 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c @@ -198,9 +198,7 @@ tapeblock_request_fn(request_queue_t *queue) device = (struct tape_device *) queue->queuedata; DBF_LH(6, "tapeblock_request_fn(device=%p)\n", device); - if (device == NULL) - BUG(); - + BUG_ON(device == NULL); tapeblock_trigger_requeue(device); } @@ -307,8 +305,7 @@ tapeblock_revalidate_disk(struct gendisk *disk) int rc; device = (struct tape_device *) disk->private_data; - if (!device) - BUG(); + BUG_ON(!device); if (!device->blk_data.medium_changed) return 0; @@ -440,11 +437,9 @@ tapeblock_ioctl( rc = 0; disk = inode->i_bdev->bd_disk; - if (!disk) - BUG(); + BUG_ON(!disk); device = disk->private_data; - if (!device) - BUG(); + BUG_ON(!device); minor = iminor(inode); DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); |