of: overlay: Remove else after goto
If an "if" branch is terminated by a "goto", there's no need to have an "else" statement and an indented block of code. Remove the "else" statement to simplify the code flow for the casual reviewer. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:

committed by
Rob Herring

parent
e9d92e40ac
commit
6de67de326
@@ -580,9 +580,9 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
|
|||||||
of_node_put(fragment->overlay);
|
of_node_put(fragment->overlay);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto err_free_fragments;
|
goto err_free_fragments;
|
||||||
} else {
|
|
||||||
cnt++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,13 +736,12 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id)
|
|||||||
devicetree_state_flags |= DTSF_APPLY_FAIL;
|
devicetree_state_flags |= DTSF_APPLY_FAIL;
|
||||||
}
|
}
|
||||||
goto err_free_overlay_changeset;
|
goto err_free_overlay_changeset;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
ret = __of_changeset_apply_notify(&ovcs->cset);
|
ret = __of_changeset_apply_notify(&ovcs->cset);
|
||||||
if (ret)
|
if (ret)
|
||||||
pr_err("overlay changeset entry notify error %d\n",
|
pr_err("overlay changeset entry notify error %d\n", ret);
|
||||||
ret);
|
/* notify failure is not fatal, continue */
|
||||||
/* fall through */
|
|
||||||
}
|
|
||||||
|
|
||||||
list_add_tail(&ovcs->ovcs_list, &ovcs_list);
|
list_add_tail(&ovcs->ovcs_list, &ovcs_list);
|
||||||
*ovcs_id = ovcs->id;
|
*ovcs_id = ovcs->id;
|
||||||
@@ -931,14 +930,12 @@ int of_overlay_remove(int *ovcs_id)
|
|||||||
if (ret_apply)
|
if (ret_apply)
|
||||||
devicetree_state_flags |= DTSF_REVERT_FAIL;
|
devicetree_state_flags |= DTSF_REVERT_FAIL;
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
ret = __of_changeset_revert_notify(&ovcs->cset);
|
ret = __of_changeset_revert_notify(&ovcs->cset);
|
||||||
if (ret) {
|
if (ret)
|
||||||
pr_err("overlay changeset entry notify error %d\n",
|
pr_err("overlay changeset entry notify error %d\n", ret);
|
||||||
ret);
|
/* notify failure is not fatal, continue */
|
||||||
/* fall through - changeset was reverted */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*ovcs_id = 0;
|
*ovcs_id = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user