Merge tag 'u-boot-imx-20200825' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / drivers / clk / aspeed / clk_ast2500.c
index ccfeded..d1940f1 100644 (file)
@@ -497,9 +497,9 @@ static int ast2500_clk_ofdata_to_platdata(struct udevice *dev)
 {
        struct ast2500_clk_priv *priv = dev_get_priv(dev);
 
-       priv->scu = devfdt_get_addr_ptr(dev);
-       if (IS_ERR(priv->scu))
-               return PTR_ERR(priv->scu);
+       priv->scu = dev_read_addr_ptr(dev);
+       if (!priv->scu)
+               return -EINVAL;
 
        return 0;
 }