diff options
author | Sean Anderson <seanga2@gmail.com> | 2019-12-24 23:57:47 -0500 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2020-01-26 12:03:06 +0100 |
commit | 90cbfa50c2b85d60f41d5e9852141058e5bad3ac (patch) | |
tree | 34b97e36e7be03ee23c4a8155971e7dd08fbd7b5 /drivers/clk | |
parent | 9fca6729c6df2bc6978a74f60c0a151e57b437d8 (diff) |
clk: Fix error checking of dev_read_addr_ptr
dev_read_addr_ptr returns NULL on error, not FDT_ADDR_T_NONE.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/imx/clk-imx6q.c | 2 | ||||
-rw-r--r-- | drivers/clk/imx/clk-imx8mm.c | 2 | ||||
-rw-r--r-- | drivers/clk/imx/clk-imx8mn.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c index 5ae4781d11..bd0d3e4f47 100644 --- a/drivers/clk/imx/clk-imx6q.c +++ b/drivers/clk/imx/clk-imx6q.c @@ -115,7 +115,7 @@ static int imx6q_clk_probe(struct udevice *dev) /* CCM clocks */ base = dev_read_addr_ptr(dev); - if (base == (void *)FDT_ADDR_T_NONE) + if (!base) return -EINVAL; clk_dm(IMX6QDL_CLK_USDHC1_SEL, diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index a05dac7c7a..fc41a028f6 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -323,7 +323,7 @@ static int imx8mm_clk_probe(struct udevice *dev) imx_clk_fixed_factor("sys_pll2_1000m", "sys_pll2_out", 1, 1)); base = dev_read_addr_ptr(dev); - if (base == (void *)FDT_ADDR_T_NONE) + if (!base) return -EINVAL; clk_dm(IMX8MM_CLK_A53_SRC, diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 4048cc63cc..eb43971ae6 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -293,7 +293,7 @@ static int imx8mn_clk_probe(struct udevice *dev) imx_clk_fixed_factor("sys_pll2_1000m", "sys_pll2_out", 1, 1)); base = dev_read_addr_ptr(dev); - if (base == (void *)FDT_ADDR_T_NONE) + if (!base) return -EINVAL; clk_dm(IMX8MN_CLK_A53_SRC, |