diff options
author | Sean Anderson | 2020-06-24 06:41:13 -0400 |
---|---|---|
committer | Andes | 2020-07-01 15:01:21 +0800 |
commit | 082faeb86526b41bb9c5ca8373168e12f2de3a10 (patch) | |
tree | 33df9c0ea326cacd807bb5fd50f33909083e4d5e /drivers/pinctrl/broadcom | |
parent | 4a3390f1d3b71f0645eb281176f00cd0d5ac2dcb (diff) |
dm: Fix error handling for dev_read_addr_ptr
dev_read_addr_ptr had different semantics depending on whether OF_LIVE was
enabled. This patch converts both implementations to return NULL on error,
and converts all call sites which check for FDT_ADDR_T_NONE to check for
NULL instead. This patch also removes the call to map_physmem, since we
have dev_remap_addr* for those semantics.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/broadcom')
-rw-r--r-- | drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c index f44af6cf9ad..c22d534da9a 100644 --- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c +++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c @@ -117,7 +117,7 @@ int bcm283x_pinctl_probe(struct udevice *dev) } priv->base_reg = dev_read_addr_ptr(dev); - if (priv->base_reg == (void *)FDT_ADDR_T_NONE) { + if (!priv->base_reg) { debug("%s: Failed to get base address\n", __func__); return -EINVAL; } |