aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaotian Feng2010-08-23 05:30:29 -0500
committerJens Axboe2010-08-23 05:30:29 -0500
commitc87ffbb812cf6150097a5095b031f4013a8f78a5 (patch)
treef22328b7cbaac2166024d9e0fdac9332b9b1115e /block/blk-sysfs.c
parent4ee69851cd4880f574d22f5ce08bec35b01c94e3 (diff)
downloadkernel-common-c87ffbb812cf6150097a5095b031f4013a8f78a5.tar.gz
kernel-common-c87ffbb812cf6150097a5095b031f4013a8f78a5.tar.xz
kernel-common-c87ffbb812cf6150097a5095b031f4013a8f78a5.zip
block: put dev->kobj in blk_register_queue fail path
kernel needs to kobject_put on dev->kobj if elv_register_queue fails. Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Nikanth Karthikesan <knikanth@suse.de> Cc: David Teigland <teigland@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 001ab18078f..0749b89c688 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -511,6 +511,7 @@ int blk_register_queue(struct gendisk *disk)
511 kobject_uevent(&q->kobj, KOBJ_REMOVE); 511 kobject_uevent(&q->kobj, KOBJ_REMOVE);
512 kobject_del(&q->kobj); 512 kobject_del(&q->kobj);
513 blk_trace_remove_sysfs(disk_to_dev(disk)); 513 blk_trace_remove_sysfs(disk_to_dev(disk));
514 kobject_put(&dev->kobj);
514 return ret; 515 return ret;
515 } 516 }
516 517