mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] nvmem: ocotp: decouple featctrl from barebox,provide-mac-address
Date: Tue, 10 Jan 2023 09:51:59 +0100	[thread overview]
Message-ID: <20230110085159.3440210-1-a.fatoum@pengutronix.de> (raw)

imx_ocotp_init_dt() does both barebox,provide-mac-address and
barebox,feature-controller parsing, but it erroneously exited
early when the former was not available. Change this so no
early exit happens.

Fixes: 4adc4e12ac95 ("nvmem: ocotp: add i.MX8M[MN] feature controller support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/nvmem/ocotp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 7545059aa92b..2fef84074302 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -646,14 +646,12 @@ static int imx_ocotp_init_dt(struct ocotp_priv *priv)
 	const __be32 *prop;
 	struct device_node *node = priv->dev.parent->of_node;
 	u32 tester4;
-	int ret, len;
+	int ret, len = 0;
 
 	if (!node)
 		return 0;
 
 	prop = of_get_property(node, "barebox,provide-mac-address", &len);
-	if (!prop)
-		return 0;
 
 	for (; len >= MAC_ADDRESS_PROPLEN; len -= MAC_ADDRESS_PROPLEN) {
 		struct device_node *rnode;
-- 
2.30.2




             reply	other threads:[~2023-01-10  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10  8:51 Ahmad Fatoum [this message]
2023-01-10 14:34 ` 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=20230110085159.3440210-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --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