watchdog: diag288_wdt: Remove redundant assignment
Subsystems (2)
PATCH 1/1 watchdog: diag288_wdt: Remove redundant assignment
From: Junlin Yang <[email protected]>
The assign for 'ret' is redundant and can be removed, because it will be assigned before use.
Signed-off-by Junlin Yang <[email protected]>
--- drivers/watchdog/diag288_wdt.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/watchdog/diag288_wdt.c +0 -4
@@ -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)
Signature · 1 line
1.9.1
Quoted 6 lines · angkery
From: Junlin Yang <[email protected]>
The assign for 'ret' is redundant and can be removed, because it will be assigned before use.
Signed-off-by Junlin Yang <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 27 lines
--- drivers/watchdog/diag288_wdt.c | 4 ---- 1 file changed, 4 deletions(-)drivers/watchdog/diag288_wdt.c +0
-4@@ -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)