[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <99e32686-3cd1-fd51-ccad-fb11541d0374@roeck-us.net>
Date: Wed, 3 Feb 2021 04:33:37 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: angkery <angkery@....com>, wim@...ux-watchdog.org
Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
Junlin Yang <yangjunlin@...ong.com>
Subject: Re: [PATCH] watchdog: diag288_wdt: Remove redundant assignment
On 2/3/21 4:24 AM, angkery wrote:
> From: Junlin Yang <yangjunlin@...ong.com>
>
> The assign for 'ret' is redundant and can be removed,
> because it will be assigned before use.
>
> Signed-off-by: Junlin Yang <yangjunlin@...ong.com>
Reviewed-by: Guenter Roeck <linux@...ck-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)
>
Powered by blists - more mailing lists