aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index b321cadd6e65..7f71b2c472b8 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -120,9 +120,10 @@ int unregister_blkdev(unsigned int major, const char *name)
120 for (n = &major_names[index]; *n; n = &(*n)->next) 120 for (n = &major_names[index]; *n; n = &(*n)->next)
121 if ((*n)->major == major) 121 if ((*n)->major == major)
122 break; 122 break;
123 if (!*n || strcmp((*n)->name, name)) 123 if (!*n || strcmp((*n)->name, name)) {
124 WARN_ON(1);
124 ret = -EINVAL; 125 ret = -EINVAL;
125 else { 126 } else {
126 p = *n; 127 p = *n;
127 *n = p->next; 128 *n = p->next;
128 } 129 }