summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-07-17 04:03:47 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 10:23:03 -0700
commitf4480240f700587c15507b7815e75989b16825b2 (patch)
tree96eac4ec200cf49cb1cbbdf185befca34d83b629 /block/genhd.c
parentc6d4d63489f2e3ce38c80e7073952f0c58d4c2bc (diff)
unregister_blkdev(): return void
Put WARN_ON and fixed all callers of unregister_blkdev(). Now we can make unregister_blkdev return void. Cc: Jens Axboe <jens.axboe@oracle.com> 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>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 7f71b2c472b8..3af1e7a378d4 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -108,13 +108,11 @@ out:
EXPORT_SYMBOL(register_blkdev);
-/* todo: make void - error printk here */
-int unregister_blkdev(unsigned int major, const char *name)
+void unregister_blkdev(unsigned int major, const char *name)
{
struct blk_major_name **n;
struct blk_major_name *p = NULL;
int index = major_to_index(major);
- int ret = 0;
mutex_lock(&block_subsys_lock);
for (n = &major_names[index]; *n; n = &(*n)->next)
@@ -122,15 +120,12 @@ int unregister_blkdev(unsigned int major, const char *name)
break;
if (!*n || strcmp((*n)->name, name)) {
WARN_ON(1);
- ret = -EINVAL;
} else {
p = *n;
*n = p->next;
}
mutex_unlock(&block_subsys_lock);
kfree(p);
-
- return ret;
}
EXPORT_SYMBOL(unregister_blkdev);