tools: Fix pylint 3.3.4 errors

This newer pylint produces errors about variables possibly being used
before being set. Adjust the code to pass these checks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass
2025-02-19 08:11:16 -07:00
committed by Tom Rini
parent 8e233cca9d
commit 6e628c221e
9 changed files with 18 additions and 5 deletions

View File

@@ -6381,6 +6381,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
ename, prop = entry_m.group(1), entry_m.group(3)
entry, entry_name, prop_name = image.LookupEntry(entries,
name, msg)
expect_val = None
if prop_name == 'offset':
expect_val = entry.offset
elif prop_name == 'image_pos':