On Tue, Jan 10, 2023 at 09:51:59AM +0100, Ahmad Fatoum wrote: > 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@xxxxxxxxxxxxxx> > --- > drivers/nvmem/ocotp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Applied, thanks Sascha > > 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 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |