mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: diag288_wdt: Remove redundant assignment
@ 2021-02-03 12:24 angkery
  2021-02-03 12:33 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: angkery @ 2021-02-03 12:24 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-watchdog, linux-kernel, Junlin Yang

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>
---
 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)
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-03 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 12:24 [PATCH] watchdog: diag288_wdt: Remove redundant assignment angkery
2021-02-03 12:33 ` Guenter Roeck

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®