Skip to content

Commit

Permalink
watchdog: diag288_wdt: Remove redundant assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junlin Yang authored and Wim Van Sebroeck committed Jun 21, 2021
1 parent 7b7d2fd commit 266b2e3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/watchdog/diag288_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 266b2e3

Please sign in to comment.