mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@wolfvision.net>
To: barebox@lists.infradead.org
Cc: Michael Riesch <michael.riesch@wolfvision.net>
Subject: [PATCH] of: overlay: fix overly strict check for symbols
Date: Mon, 26 Sep 2022 12:06:10 +0200	[thread overview]
Message-ID: <20220926100610.1457821-1-michael.riesch@wolfvision.net> (raw)

The recent patch "of: overlay: improve error handling in
of_overlay_apply_tree" introduced overly strict checks for symbols
in the root device tree and the overlay. However, it is legal for
both to have no symbols. Fix the checks in order to implement the
status quo.

Fixes: bc475fd88810 ("of: overlay: improve error handling in of_overlay_apply_tree")
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
 drivers/of/overlay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 0fc440fdcf..9d112b67f1 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -131,12 +131,12 @@ static int of_overlay_apply_symbols(struct device_node *root,
 
 	if (!overlay_symbols) {
 		pr_debug("overlay doesn't have a __symbols__ node\n");
-		return -EINVAL;
+		return 0;
 	}
 
 	if (!root_symbols) {
 		pr_info("root doesn't have a __symbols__ node\n");
-		return -EINVAL;
+		return 0;
 	}
 
 	list_for_each_entry(prop, &overlay_symbols->properties, list) {
-- 
2.30.2




             reply	other threads:[~2022-09-26 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 10:06 Michael Riesch [this message]
2022-09-26 10:26 ` Ahmad Fatoum
2022-09-30 12:25 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220926100610.1457821-1-michael.riesch@wolfvision.net \
    --to=michael.riesch@wolfvision.net \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox