diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-14 10:38:35 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-14 10:38:35 -0700 |
commit | 07c57548539dbeeb3c4d3766b02eaf4b2d945f8f (patch) | |
tree | d0e53e8e213fa26a151367f60c7699f5719d898e /block/blk-cgroup.c | |
parent | 977826e7012c4efebcb5b923d15455ebd468b579 (diff) | |
parent | 8a7eb06341c73248d152a2a12e4f00f472295de7 (diff) |
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlsk-v3.14-15.08-android
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index d8f80e733cf8..a7175855b6ed 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -703,8 +703,12 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, return -EINVAL; disk = get_gendisk(MKDEV(major, minor), &part); - if (!disk || part) + if (!disk) return -EINVAL; + if (part) { + put_disk(disk); + return -EINVAL; + } rcu_read_lock(); spin_lock_irq(disk->queue->queue_lock); |