platform_external_dtc/tests/bad-size-cells.dts
Jack Miller 64c46b098b Fix crash with poorly defined #size-cells
If you have a parent block with #size-cells improperly set to 0, and
then subsequently try to include a regs property in the child, dtc will
crash with SIGFPE while validating it. This patch fixes that crash,
instead printing the same invalid length warning that was causing it.

Test included.

Signed-off-by: Jack Miller <jack@codezen.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-04-30 10:55:41 +10:00

12 lines
142 B
Text

/dts-v1/;
/ {
mangled {
#address-cells = <0x0>;
#size-cells = <0x0>;
valid {
reg = <0x0 0x4000000>;
};
};
};