diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-01-10 09:51:59 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:34:09 +0100 |
commit | 12763d0fe56899d3729d0e6755446ed7c740a88a (patch) | |
tree | e0f00656bd5427583f46c7c0076d12474f2a7063 /drivers | |
parent | 285d7d21ab0acc7a50590dd322915ce6f49fa400 (diff) | |
download | barebox-12763d0fe56899d3729d0e6755446ed7c740a88a.tar.gz |
nvmem: ocotp: decouple featctrl from barebox,provide-mac-address
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>
Link: https://lore.barebox.org/20230110085159.3440210-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvmem/ocotp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c index 08171cb5cd..7cc2b3b3db 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->device_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; |