summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-06 21:41:36 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 08:52:29 +0800
commitb14c53398683952723540f82027fb0cbfba4f7de (patch)
tree7724a46df10d9aaa274936a85ee7fd97ea2c5229 /include/pci.h
parentbcee8d6764f9215f16b393a35581000178633254 (diff)
dm: core: Fix offset_to_ofnode() with invalid offset
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 could of course change that function, but it seems much better to always use the same value for an invalid node. Fix it by setting the offset to -1 if it is invalid for any reason. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/pci.h')
0 files changed, 0 insertions, 0 deletions