projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d350e6b
)
block, blk-sysfs: Fix an err return path in blk_register_queue()
author
Liu Yuan
<tailai.ly@taobao.com>
Tue, 19 Apr 2011 11:47:58 +0000
(13:47 +0200)
committer
Jens Axboe
<jaxboe@fusionio.com>
Tue, 19 Apr 2011 11:51:53 +0000
(13:51 +0200)
We do not call blk_trace_remove_sysfs() in err return path
if kobject_add() fails. This path fixes it.
Cc: stable@kernel.org
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/block/blk-sysfs.c
b/block/blk-sysfs.c
index 6d735122bc59499693d8682d4730c92ff63c91be..5d696adbc4dcdaa94a45943f92d34aba441ff173 100644
(file)
--- a/
block/blk-sysfs.c
+++ b/
block/blk-sysfs.c
@@
-508,8
+508,10
@@
int blk_register_queue(struct gendisk *disk)
return ret;
ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue");
- if (ret < 0)
+ if (ret < 0) {
+ blk_trace_remove_sysfs(dev);
return ret;
+ }
kobject_uevent(&q->kobj, KOBJ_ADD);