From: Akinobu Mita Date: Tue, 17 Jul 2007 11:03:46 +0000 (-0700) Subject: unregister_blkdev() delete redundant messages in callers X-Git-Tag: v2.6.23-rc1~719 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00d59405cf6d7ef8932394ab5a12da1a50ce581e;p=linux-2.6 unregister_blkdev() delete redundant messages in callers No need to warn unregister_blkdev() failure by the callers. (The previous patch makes unregister_blkdev() print error message in error case) Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 06eaa11cbc..e425daa1ea 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1568,8 +1568,7 @@ static void __exit loop_exit(void) loop_del_one(lo); blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range); - if (unregister_blkdev(LOOP_MAJOR, "loop")) - printk(KERN_WARNING "loop: cannot unregister blkdev\n"); + unregister_blkdev(LOOP_MAJOR, "loop"); } module_init(loop_init); diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 2abf94cc31..e40fa98842 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c @@ -371,9 +371,7 @@ static void __exit z2_exit(void) { int i, j; blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); - if ( unregister_blkdev( Z2RAM_MAJOR, DEVICE_NAME ) != 0 ) - printk( KERN_ERR DEVICE_NAME ": unregister of device failed\n"); - + unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME); del_gendisk(z2ram_gendisk); put_disk(z2ram_gendisk); blk_cleanup_queue(z2_queue); diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f4f7d35561..846614e676 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -161,9 +161,7 @@ static void local_exit(void) { kmem_cache_destroy(_tio_cache); kmem_cache_destroy(_io_cache); - - if (unregister_blkdev(_major, _name) < 0) - DMERR("unregister_blkdev failed"); + unregister_blkdev(_major, _name); _major = 0; diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 1340451ea4..35765f6a86 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -747,14 +747,9 @@ dcssblk_check_params(void) static void __exit dcssblk_exit(void) { - int rc; - PRINT_DEBUG("DCSSBLOCK EXIT...\n"); s390_root_dev_unregister(dcssblk_root_dev); - rc = unregister_blkdev(dcssblk_major, DCSSBLK_NAME); - if (rc) { - PRINT_ERR("unregister_blkdev() failed!\n"); - } + unregister_blkdev(dcssblk_major, DCSSBLK_NAME); PRINT_DEBUG("...finished!\n"); } diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index 512857a231..5157a2abc5 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c @@ -619,8 +619,7 @@ static void __exit jsflash_cleanup_module(void) jsf0.busy = 0; misc_deregister(&jsf_dev); - if (unregister_blkdev(JSFD_MAJOR, "jsfd") != 0) - printk("jsfd: cleanup_module failed\n"); + unregister_blkdev(JSFD_MAJOR, "jsfd"); blk_cleanup_queue(jsf_queue); }