mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: angkery <angkery@163.com>, wim@linux-watchdog.org
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	Junlin Yang <yangjunlin@yulong.com>
Subject: Re: [PATCH] watchdog: diag288_wdt: Remove redundant assignment
Date: Wed, 3 Feb 2021 04:33:37 -0800	[thread overview]
Message-ID: <99e32686-3cd1-fd51-ccad-fb11541d0374@roeck-us.net> (raw)
In-Reply-To: <20210203122404.752-1-angkery@163.com>

On 2/3/21 4:24 AM, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> The assign for 'ret' is redundant and can be removed,
> because it will be assigned before use.
> 
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

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

> ---
>  drivers/watchdog/diag288_wdt.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c
> index aafc8d9..4cb1087 100644
> --- a/drivers/watchdog/diag288_wdt.c
> +++ b/drivers/watchdog/diag288_wdt.c
> @@ -118,8 +118,6 @@ static int wdt_start(struct watchdog_device *dev)
>  	if (test_and_set_bit(DIAG_WDOG_BUSY, &wdt_status))
>  		return -EBUSY;
>  
> -	ret = -ENODEV;
> -
>  	if (MACHINE_IS_VM) {
>  		ebc_cmd = kmalloc(MAX_CMDLEN, GFP_KERNEL);
>  		if (!ebc_cmd) {
> @@ -167,8 +165,6 @@ static int wdt_ping(struct watchdog_device *dev)
>  	int ret;
>  	unsigned int func;
>  
> -	ret = -ENODEV;
> -
>  	if (MACHINE_IS_VM) {
>  		ebc_cmd = kmalloc(MAX_CMDLEN, GFP_KERNEL);
>  		if (!ebc_cmd)
> 


      reply	other threads:[~2021-02-03 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 12:24 angkery
2021-02-03 12:33 ` 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=99e32686-3cd1-fd51-ccad-fb11541d0374@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=angkery@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@linux-watchdog.org \
    --cc=yangjunlin@yulong.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

all inboxes | Powered by JetHome®