diff options
Diffstat (limited to 'scripts/dtc/pylibfdt')
-rw-r--r-- | scripts/dtc/pylibfdt/libfdt.i_shipped | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped index 6774b93b2c..5b38e63b26 100644 --- a/scripts/dtc/pylibfdt/libfdt.i_shipped +++ b/scripts/dtc/pylibfdt/libfdt.i_shipped @@ -442,7 +442,11 @@ class Fdt: Raises: FdtException if any error occurs """ - return check_err(fdt_pack(self._fdt), quiet) + err = check_err(fdt_pack(self._fdt), quiet) + if err: + return err + del self._fdt[self.totalsize():] + return err def getprop(self, nodeoffset, prop_name, quiet=()): """Get a property from a node |