kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] lkdtm: remove redundant initialization of ret
@ 2019-06-14  9:43 Colin King
  2019-06-20 18:13 ` Kees Cook
  2019-06-21 14:03 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 7+ messages in thread
From: Colin King @ 2019-06-14  9:43 UTC (permalink / raw)
  To: Kees Cook, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable ret is being initialized with the value -EINVAL however
this value is never read and ret is being re-assigned later on. Hence
the initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/misc/lkdtm/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
index bba093224813..92df35fdeab0 100644
--- a/drivers/misc/lkdtm/core.c
+++ b/drivers/misc/lkdtm/core.c
@@ -390,7 +390,7 @@ static int __init lkdtm_module_init(void)
 {
 	struct crashpoint *crashpoint = NULL;
 	const struct crashtype *crashtype = NULL;
-	int ret = -EINVAL;
+	int ret;
 	int i;
 
 	/* Neither or both of these need to be set */
-- 
2.20.1

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

end of thread, other threads:[~2019-06-23  5:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14  9:43 [PATCH][next] lkdtm: remove redundant initialization of ret Colin King
2019-06-20 18:13 ` Kees Cook
2019-06-21 13:50   ` Greg Kroah-Hartman
2019-06-21 14:03 ` Greg Kroah-Hartman
2019-06-21 14:05   ` Greg Kroah-Hartman
2019-06-21 16:26     ` Kees Cook
2019-06-23  5:00       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).