public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us•net>
To: Frank Lee <frank@allwinnertech•com>
Cc: linux-watchdog@vger•kernel.org, tiny.windzz@gmail•com,
	linux-kernel@vger•kernel.org, mripard@kernel•org, wens@csie•org,
	wuyan@allwinnertech•com, wim@linux-watchdog•org,
	linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH] watchdog: sunxi_wdt: fix improper error exit code
Date: Fri, 29 May 2020 09:51:53 -0700	[thread overview]
Message-ID: <20200529165153.GA162777@roeck-us.net> (raw)
In-Reply-To: <20200529094514.26374-1-frank@allwinnertech.com>

On Fri, May 29, 2020 at 05:45:14PM +0800, Frank Lee wrote:
> From: Martin Wu <wuyan@allwinnertech•com>
> 
> sunxi_wdt_probe() should return -ENOMEM when devm_kzalloc() fails.
> 
> Signed-off-by: Martin Wu <wuyan@allwinnertech•com>
> Signed-off-by: Frank Lee <frank@allwinnertech•com>

Reviewed-by: Guenter Roeck <linux@roeck-us•net>

> ---
>  drivers/watchdog/sunxi_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index 5f05a45ac187..b50757882a98 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -235,7 +235,7 @@ static int sunxi_wdt_probe(struct platform_device *pdev)
>  
>  	sunxi_wdt = devm_kzalloc(dev, sizeof(*sunxi_wdt), GFP_KERNEL);
>  	if (!sunxi_wdt)
> -		return -EINVAL;
> +		return -ENOMEM;
>  
>  	sunxi_wdt->wdt_regs = of_device_get_match_data(dev);
>  	if (!sunxi_wdt->wdt_regs)
> -- 
> 2.24.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2020-05-29 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  9:45 [PATCH] watchdog: sunxi_wdt: fix improper error exit code Frank Lee
2020-05-29 11:08 ` Maxime Ripard
2020-05-29 16:51 ` Guenter Roeck [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=20200529165153.GA162777@roeck-us.net \
    --to=linux@roeck-us$(echo .)net \
    --cc=frank@allwinnertech$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-watchdog@vger$(echo .)kernel.org \
    --cc=mripard@kernel$(echo .)org \
    --cc=tiny.windzz@gmail$(echo .)com \
    --cc=wens@csie$(echo .)org \
    --cc=wim@linux-watchdog$(echo .)org \
    --cc=wuyan@allwinnertech$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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