projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62239ac
)
unregister_blkdev(): do WARN_ON on failure
author
Akinobu Mita
<
[email protected]
>
Tue, 17 Jul 2007 11:03:45 +0000
(
04:03
-0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 17 Jul 2007 17:23:03 +0000
(10:23 -0700)
When unregister_blkdev() has failed, something wrong happened. This patch
adds WARN_ON to notify of such badness.
Cc: Jens Axboe <
[email protected]
>
Signed-off-by: Akinobu Mita <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
block/genhd.c
patch
|
blob
|
history
diff --git
a/block/genhd.c
b/block/genhd.c
index b321cadd6e65b5d543aed766ccdc09cad0be7eb0..7f71b2c472b836e8df9a6953e4f81058fa800793 100644
(file)
--- a/
block/genhd.c
+++ b/
block/genhd.c
@@
-120,9
+120,10
@@
int unregister_blkdev(unsigned int major, const char *name)
for (n = &major_names[index]; *n; n = &(*n)->next)
if ((*n)->major == major)
break;
- if (!*n || strcmp((*n)->name, name))
+ if (!*n || strcmp((*n)->name, name)) {
+ WARN_ON(1);
ret = -EINVAL;
- else {
+
}
else {
p = *n;
*n = p->next;
}