Commit 93e6d5d8 authored by Tejun Heo's avatar Tejun Heo
Browse files

blkcg: cosmetic updates to blkg_create()

* Rename out_* labels to err_*.

* Do ERR_PTR() conversion once in the error return path.

This patch is cosmetic and to prepare for the hierarchy support.
Signed-off-by: default avatarTejun Heo <>
Acked-by: default avatarVivek Goyal <>
parent 86cde6b6
......@@ -187,16 +187,16 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
/* blkg holds a reference to blkcg */
if (!css_tryget(&blkcg->css)) {
blkg = ERR_PTR(-EINVAL);
goto out_free;
ret = -EINVAL;
goto err_free_blkg;
/* allocate */
if (!new_blkg) {
new_blkg = blkg_alloc(blkcg, q, GFP_ATOMIC);
if (unlikely(!new_blkg)) {
blkg = ERR_PTR(-ENOMEM);
goto out_put;
ret = -ENOMEM;
goto err_put_css;
blkg = new_blkg;
......@@ -213,12 +213,11 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
if (!ret)
return blkg;
blkg = ERR_PTR(ret);
return blkg;
return ERR_PTR(ret);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment