unregister_blkdev() delete redundant messages in callers
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 17 Jul 2007 11:03:46 +0000 (04:03 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:03 +0000 (10:23 -0700)
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 <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/loop.c
drivers/block/z2ram.c
drivers/md/dm.c
drivers/s390/block/dcssblk.c
drivers/sbus/char/jsflash.c

index 06eaa11cbc2fdb6f298ef7cd88708adb2f059898..e425daa1eac323e20eb00dc01ff95049acab4c0e 100644 (file)
@@ -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);
index 2abf94cc3137ab9df84ebcdb8c9613fa5e4dd66b..e40fa98842e5a96a0e396d63ebb5a5f7e3710807 100644 (file)
@@ -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);
index f4f7d35561ab83753f03fe16a186514514916bf6..846614e676c6bedb678b81ea2b4ac9e0767ff26d 100644 (file)
@@ -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;
 
index 1340451ea408534423d50ec5cd5b37e9802b7a24..35765f6a86e09c79cd7dd5d6cc49dfa52f3ea0d2 100644 (file)
@@ -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");
 }
 
index 512857a23169b4645e1228b7fb46159015cc72df..5157a2abc58dd23041985534f8f6d099465f54bd 100644 (file)
@@ -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);
 }