Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of: overlay: Simplify of_overlay_fdt_apply() tail

It does not hurt to fill in the changeset id while the mutex is still
held. After doing so, the function tails for the success and failure
cases become identical, so they can be unified.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/6a3357a8f7f29704350e3ffae768ee8a462b54d3.1657893306.git.geert+renesas@glider.be

authored by

Geert Uytterhoeven and committed by
Rob Herring
e76f4a61 e385b0ba

+2 -7
+2 -7
drivers/of/overlay.c
··· 1043 1043 * goto err_free_ovcs. Instead, the caller of of_overlay_fdt_apply() 1044 1044 * can call of_overlay_remove(); 1045 1045 */ 1046 - 1047 - mutex_unlock(&of_mutex); 1048 - of_overlay_mutex_unlock(); 1049 - 1050 1046 *ret_ovcs_id = ovcs->id; 1051 - 1052 - return ret; 1047 + goto out_unlock; 1053 1048 1054 1049 err_free_ovcs: 1055 1050 free_overlay_changeset(ovcs); 1056 1051 1052 + out_unlock: 1057 1053 mutex_unlock(&of_mutex); 1058 1054 of_overlay_mutex_unlock(); 1059 - 1060 1055 return ret; 1061 1056 } 1062 1057 EXPORT_SYMBOL_GPL(of_overlay_fdt_apply);