FDT.pm: consistently check defined()
In a few cases, we check not $var to check if a var has a defined value.
This also catches the case where $var has a defined value, but evaluates
to false (e.g. if $var is zero).
In FDT::Node::get_translated_reg(), this erroneous check means that reg
entries with an address zero will not be translated, even where there is
a valid set of ranges properties in parent nodes.
Elsewhere, this is simply inconsistent, but not otherwise harmful.
Fix the code to use defined($var) consistently.
Signed-off-by: Mark Rutland <email@example.com>
Reported-by: Vladimir Murzin <firstname.lastname@example.org>
Tested-by: Vladimir Murzin <email@example.com>
1 file changed