mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-26 00:01:48 +02:00
- wdt: dw: Fix passing NULL pointer to reset functions (Sean)
This commit is contained in:
commit
e3f5edf659
@ -22,7 +22,7 @@
|
|||||||
struct designware_wdt_priv {
|
struct designware_wdt_priv {
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
unsigned int clk_khz;
|
unsigned int clk_khz;
|
||||||
struct reset_ctl_bulk *resets;
|
struct reset_ctl_bulk resets;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -99,11 +99,11 @@ static int designware_wdt_stop(struct udevice *dev)
|
|||||||
if (CONFIG_IS_ENABLED(DM_RESET)) {
|
if (CONFIG_IS_ENABLED(DM_RESET)) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = reset_assert_bulk(priv->resets);
|
ret = reset_assert_bulk(&priv->resets);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = reset_deassert_bulk(priv->resets);
|
ret = reset_deassert_bulk(&priv->resets);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -156,11 +156,11 @@ static int designware_wdt_probe(struct udevice *dev)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (CONFIG_IS_ENABLED(DM_RESET)) {
|
if (CONFIG_IS_ENABLED(DM_RESET)) {
|
||||||
ret = reset_get_bulk(dev, priv->resets);
|
ret = reset_get_bulk(dev, &priv->resets);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
ret = reset_deassert_bulk(priv->resets);
|
ret = reset_deassert_bulk(&priv->resets);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user