u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de
Cc: Leo Liang <ycliang@andestech.com>, Meng Li <Meng.Li@windriver.com>
Subject: Re: [PATCH] wdt: dw: Fix passing NULL pointer to reset functions
Date: Mon, 20 Sep 2021 10:26:39 +0200	[thread overview]
Message-ID: <39276067-920f-2a41-a357-3db6a58164a6@denx.de> (raw)
In-Reply-To: <20210911191130.931814-1-seanga2@gmail.com>

On 11.09.21 21:11, 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@gmail.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
> 
>   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;
>   	}
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

      parent reply	other threads:[~2021-09-20  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 19:11 [PATCH] wdt: dw: Fix passing NULL pointer to reset functions Sean Anderson
2021-09-19 23:07 ` Sean Anderson
2021-09-20  5:31   ` Stefan Roese
2021-09-20  5:32 ` Stefan Roese
2021-09-20  8:26 ` Stefan Roese [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39276067-920f-2a41-a357-3db6a58164a6@denx.de \
    --to=sr@denx.de \
    --cc=Meng.Li@windriver.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).