watchdog: diag288_wdt: Remove redundant assignment
authorJunlin Yang <yangjunlin@yulong.com>
Wed, 3 Feb 2021 12:24:04 +0000 (20:24 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 21 Jun 2021 06:49:14 +0000 (08:49 +0200)
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>
Link: https://lore.kernel.org/r/20210203122404.752-1-angkery@163.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/diag288_wdt.c

index aafc8d98bf9fd4dbd8a97c038438b5a2e39f608e..4cb10877017c7781d021253468589957df49afa8 100644 (file)
@@ -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)