diff options
Diffstat (limited to 'drivers/watchdog/ast_wdt.c')
-rw-r--r-- | drivers/watchdog/ast_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c index 7e11465a57..9b83d2ad44 100644 --- a/drivers/watchdog/ast_wdt.c +++ b/drivers/watchdog/ast_wdt.c @@ -90,9 +90,9 @@ static int ast_wdt_ofdata_to_platdata(struct udevice *dev) { struct ast_wdt_priv *priv = dev_get_priv(dev); - priv->regs = devfdt_get_addr_ptr(dev); - if (IS_ERR(priv->regs)) - return PTR_ERR(priv->regs); + priv->regs = dev_read_addr_ptr(dev); + if (!priv->regs) + return -EINVAL; return 0; } |