libfdt: Fixup usage of fdt_offset_ptr() in fdt_rw.c

Several places in fdt_rw.c incorrectly use fdt_offset_ptr(), using it
as if it returned an encoded error code on errors, instead of
returning NULL on error as it actually does.

In fact, however, in these instances the extra checks in
fdt_offset_ptr() are useless anyway, so we introduce a new (internal
use) _fdt_offset_ptr() and use that without checking.
(cherry picked from 3dffb1808dea6aee6158c92e17faa6ced9b183f2 commit)
3 files changed