[PATCH] wdt: dw: Fix passing NULL pointer to reset functions
Sean Anderson
seanga2 at gmail.com
Mon Sep 20 01:07:59 CEST 2021
Is it possible to get this in 2020.10? Meng's patch breaks boards which use this watchdog.
--Sean
On 9/11/21 3:11 PM, Sean Anderson wrote:
> reset_*_bulk expects a real pointer.
>
> Fixes: 4f7abafe1c ("driver: watchdog: reset watchdog in designware_wdt_stop() function")
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
> drivers/watchdog/designware_wdt.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
> index afed81e6c6..cfec29bd15 100644
> --- a/drivers/watchdog/designware_wdt.c
> +++ b/drivers/watchdog/designware_wdt.c
> @@ -22,7 +22,7 @@
> struct designware_wdt_priv {
> void __iomem *base;
> 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)) {
> int ret;
>
> - ret = reset_assert_bulk(priv->resets);
> + ret = reset_assert_bulk(&priv->resets);
> if (ret)
> return ret;
>
> - ret = reset_deassert_bulk(priv->resets);
> + ret = reset_deassert_bulk(&priv->resets);
> if (ret)
> return ret;
> }
> @@ -156,11 +156,11 @@ static int designware_wdt_probe(struct udevice *dev)
> #endif
>
> if (CONFIG_IS_ENABLED(DM_RESET)) {
> - ret = reset_get_bulk(dev, priv->resets);
> + ret = reset_get_bulk(dev, &priv->resets);
> if (ret)
> goto err;
>
> - ret = reset_deassert_bulk(priv->resets);
> + ret = reset_deassert_bulk(&priv->resets);
> if (ret)
> goto err;
> }
>
More information about the U-Boot
mailing list