Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f809e1f authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Grant Likely
Browse files

of/flattree: Fix unhandled OF_DT_NOP tag when unflattening the device tree



NOPs within the property section are skipped, but NOPs between
OF_DT_END_NODE and OF_DT_BEGIN_NODE were not. My firmware NOPs out
entire nodes depending on various environment parameters.

of_scan_flat_dt already handles NOP more generally.

Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 220bf991
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -376,7 +376,10 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
		if (!np->type)
			np->type = "<NULL>";
	}
	while (tag == OF_DT_BEGIN_NODE) {
	while (tag == OF_DT_BEGIN_NODE || tag == OF_DT_NOP) {
		if (tag == OF_DT_NOP)
			*p += 4;
		else
			mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize);
		tag = be32_to_cpup((__be32 *)(*p));
	}