Re: [PATCH v6 003/102] dm: core: Fix offset_to_ofnode() with invalid offset

2019-12-07 Thread Bin Meng
On Sat, Dec 7, 2019 at 12:45 PM Simon Glass wrote: > > If the offset is -1 this function correctly sets up a null ofnode. But if > the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it > does the wrong thing. > > An offset of -1 in ofnode indicates that the ofnode is not valid. A

[PATCH v6 003/102] dm: core: Fix offset_to_ofnode() with invalid offset

2019-12-06 Thread Simon Glass
If the offset is -1 this function correctly sets up a null ofnode. But if the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it does the wrong thing. An offset of -1 in ofnode indicates that the ofnode is not valid. Any other negative value is not handled by ofnode_valid(). We co