diff options
-rw-r--r-- | block/genhd.c | 7 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
2 files changed, 2 insertions, 7 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: | |||
108 | 108 | ||
109 | EXPORT_SYMBOL(register_blkdev); | 109 | EXPORT_SYMBOL(register_blkdev); |
110 | 110 | ||
111 | /* todo: make void - error printk here */ | 111 | void unregister_blkdev(unsigned int major, const char *name) |
112 | int unregister_blkdev(unsigned int major, const char *name) | ||
113 | { | 112 | { |
114 | struct blk_major_name **n; | 113 | struct blk_major_name **n; |
115 | struct blk_major_name *p = NULL; | 114 | struct blk_major_name *p = NULL; |
116 | int index = major_to_index(major); | 115 | int index = major_to_index(major); |
117 | int ret = 0; | ||
118 | 116 | ||
119 | mutex_lock(&block_subsys_lock); | 117 | mutex_lock(&block_subsys_lock); |
120 | for (n = &major_names[index]; *n; n = &(*n)->next) | 118 | for (n = &major_names[index]; *n; n = &(*n)->next) |
@@ -122,15 +120,12 @@ int unregister_blkdev(unsigned int major, const char *name) | |||
122 | break; | 120 | break; |
123 | if (!*n || strcmp((*n)->name, name)) { | 121 | if (!*n || strcmp((*n)->name, name)) { |
124 | WARN_ON(1); | 122 | WARN_ON(1); |
125 | ret = -EINVAL; | ||
126 | } else { | 123 | } else { |
127 | p = *n; | 124 | p = *n; |
128 | *n = p->next; | 125 | *n = p->next; |
129 | } | 126 | } |
130 | mutex_unlock(&block_subsys_lock); | 127 | mutex_unlock(&block_subsys_lock); |
131 | kfree(p); | 128 | kfree(p); |
132 | |||
133 | return ret; | ||
134 | } | 129 | } |
135 | 130 | ||
136 | EXPORT_SYMBOL(unregister_blkdev); | 131 | EXPORT_SYMBOL(unregister_blkdev); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b3a9f0db9d80..aa74f7de9dcd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1527,7 +1527,7 @@ extern void putname(const char *name); | |||
1527 | 1527 | ||
1528 | #ifdef CONFIG_BLOCK | 1528 | #ifdef CONFIG_BLOCK |
1529 | extern int register_blkdev(unsigned int, const char *); | 1529 | extern int register_blkdev(unsigned int, const char *); |
1530 | extern int unregister_blkdev(unsigned int, const char *); | 1530 | extern void unregister_blkdev(unsigned int, const char *); |
1531 | extern struct block_device *bdget(dev_t); | 1531 | extern struct block_device *bdget(dev_t); |
1532 | extern void bd_set_size(struct block_device *, loff_t size); | 1532 | extern void bd_set_size(struct block_device *, loff_t size); |
1533 | extern void bd_forget(struct inode *inode); | 1533 | extern void bd_forget(struct inode *inode); |