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>
This commit is contained in:
Sean Anderson 2019-12-24 23:57:47 -05:00 committed by Lukasz Majewski
parent 9fca6729c6
commit 90cbfa50c2
3 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,