Commit 00d59405 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 294462a5
...@@ -1568,8 +1568,7 @@ static void __exit loop_exit(void) ...@@ -1568,8 +1568,7 @@ static void __exit loop_exit(void)
loop_del_one(lo); loop_del_one(lo);
blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range); blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range);
if (unregister_blkdev(LOOP_MAJOR, "loop")) unregister_blkdev(LOOP_MAJOR, "loop");
printk(KERN_WARNING "loop: cannot unregister blkdev\n");
} }
module_init(loop_init); module_init(loop_init);
......
...@@ -371,9 +371,7 @@ static void __exit z2_exit(void) ...@@ -371,9 +371,7 @@ static void __exit z2_exit(void)
{ {
int i, j; int i, j;
blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
if ( unregister_blkdev( Z2RAM_MAJOR, DEVICE_NAME ) != 0 ) unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
printk( KERN_ERR DEVICE_NAME ": unregister of device failed\n");
del_gendisk(z2ram_gendisk); del_gendisk(z2ram_gendisk);
put_disk(z2ram_gendisk); put_disk(z2ram_gendisk);
blk_cleanup_queue(z2_queue); blk_cleanup_queue(z2_queue);
......
...@@ -161,9 +161,7 @@ static void local_exit(void) ...@@ -161,9 +161,7 @@ static void local_exit(void)
{ {
kmem_cache_destroy(_tio_cache); kmem_cache_destroy(_tio_cache);
kmem_cache_destroy(_io_cache); kmem_cache_destroy(_io_cache);
unregister_blkdev(_major, _name);
if (unregister_blkdev(_major, _name) < 0)
DMERR("unregister_blkdev failed");
_major = 0; _major = 0;
......
...@@ -747,14 +747,9 @@ dcssblk_check_params(void) ...@@ -747,14 +747,9 @@ dcssblk_check_params(void)
static void __exit static void __exit
dcssblk_exit(void) dcssblk_exit(void)
{ {
int rc;
PRINT_DEBUG("DCSSBLOCK EXIT...\n"); PRINT_DEBUG("DCSSBLOCK EXIT...\n");
s390_root_dev_unregister(dcssblk_root_dev); s390_root_dev_unregister(dcssblk_root_dev);
rc = unregister_blkdev(dcssblk_major, DCSSBLK_NAME); unregister_blkdev(dcssblk_major, DCSSBLK_NAME);
if (rc) {
PRINT_ERR("unregister_blkdev() failed!\n");
}
PRINT_DEBUG("...finished!\n"); PRINT_DEBUG("...finished!\n");
} }
......
...@@ -619,8 +619,7 @@ static void __exit jsflash_cleanup_module(void) ...@@ -619,8 +619,7 @@ static void __exit jsflash_cleanup_module(void)
jsf0.busy = 0; jsf0.busy = 0;
misc_deregister(&jsf_dev); misc_deregister(&jsf_dev);
if (unregister_blkdev(JSFD_MAJOR, "jsfd") != 0) unregister_blkdev(JSFD_MAJOR, "jsfd");
printk("jsfd: cleanup_module failed\n");
blk_cleanup_queue(jsf_queue); blk_cleanup_queue(jsf_queue);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment