From: Guenter Roeck <linux@roeck-us.net>
To: Frank Lee <frank@allwinnertech.com>
Cc: wim@linux-watchdog.org, mripard@kernel.org, wens@csie.org,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, wuyan@allwinnertech.com,
tiny.windzz@gmail.com
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
>
prev 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.net \
--cc=frank@allwinnertech.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=tiny.windzz@gmail.com \
--cc=wens@csie.org \
--cc=wim@linux-watchdog.org \
--cc=wuyan@allwinnertech.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).