summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mvebu/pinctrl-mvebu.c
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-08-03 22:17:35 +0300
committerSimon Glass <sjg@chromium.org>2020-08-22 07:59:14 -0600
commit3fe69d3764c3ca6f304c51faa6aae7a84f1fa56c (patch)
tree4c61149fa9ef7f082f02ef176363e99cb2301ec5 /drivers/pinctrl/mvebu/pinctrl-mvebu.c
parent02291d83fdaaf30e355eb7cef05581ec086962bd (diff)
downloadu-boot-3fe69d3764c3ca6f304c51faa6aae7a84f1fa56c.tar.gz
dm: core: Fix devfdt_get_addr_ptr return value
According to the description of devfdt_get_addr_ptr, this function should return NULL on failure, but currently it returns (void *)FDT_ADDR_T_NONE. Fix this by making devfdt_get_addr_ptr return NULL on failure, as described in the function comments. Also, update the drivers currently checking (void *)FDT_ADDR_T_NONE to check for NULL. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-mvebu.c')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-mvebu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 2206e958ec..ac0377e796 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -194,7 +194,7 @@ int mvebu_pinctl_probe(struct udevice *dev)
}
priv->base_reg = devfdt_get_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;
}