diff options
author | Liu Yuan <tailai.ly@taobao.com> | 2011-04-19 13:47:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-02 09:19:32 -0700 |
commit | 343b1a2525647d9035710c03042fe7e27b91a951 (patch) | |
tree | f98d758e197c8acc884d3958b7efb83f2b0cd925 /block | |
parent | f82e213b907b6cd6113e2414f92271a0b1ecb90f (diff) |
block, blk-sysfs: Fix an err return path in blk_register_queue()
commit ed5302d3c25006a9edc7a7fbea97a30483f89ef7 upstream.
We do not call blk_trace_remove_sysfs() in err return path
if kobject_add() fails. This path fixes it.
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-sysfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 41fb69150b4d..3655e193e60e 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -511,8 +511,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); |