lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210708151700.GA73351@683a21ea9637>
Date:   Thu, 8 Jul 2021 23:17:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH] printk: fix returnvar.cocci warnings

From: kernel test robot <lkp@...el.com>

kernel/printk/printk.c:2189:5-8: Unneeded variable: "ret". Return "- ENOMEM" on line 2294


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: c4049cfc8a03 ("printk: move console printing to kthreads")
CC: John Ogness <john.ogness@...utronix.de>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-rebase
head:   7e175e6b59975c8901ad370f7818937f68de45c1
commit: c4049cfc8a0327c22d56855882d8e2cffd6d20fa [11/222] printk: move console printing to kthreads
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago

 printk.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2186,7 +2186,6 @@ static int printk_kthread_func(void *dat
 	struct printk_record r;
 	char *ext_text = NULL;
 	size_t dropped_len;
-	int ret = -ENOMEM;
 	char *text = NULL;
 	char *write_text;
 	size_t len;
@@ -2291,7 +2290,7 @@ out:
 	pr_info("%sconsole [%s%d]: printing thread stopped\n",
 		(con->flags & CON_BOOT) ? "boot" : "",
 		con->name, con->index);
-	return ret;
+	return -ENOMEM;
 }
 
 /* Must be called within console_lock(). */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ