of: overlay: Avoid spurious error messages in of_overlay_remove()

Make of_overlay_remove() tolerate ovcs_id being 0 without logging an error.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/f756e04e8bc239b33a0428c2dd055f202e214f0b.1761335298.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
Christophe JAILLET 2025-10-24 21:50:58 +02:00 committed by Rob Herring (Arm)
parent 527bb3a747
commit b012c2ac37
1 changed files with 3 additions and 0 deletions

View File

@ -1190,6 +1190,9 @@ int of_overlay_remove(int *ovcs_id)
struct overlay_changeset *ovcs;
int ret, ret_apply, ret_tmp;
if (*ovcs_id == 0)
return 0;
if (devicetree_corrupt()) {
pr_err("suspect devicetree state, refuse to remove overlay\n");
ret = -EBUSY;