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-next>] [day] [month] [year] [list]
Message-Id: <1454342039-14068-1-git-send-email-wuninsu@gmail.com>
Date:	Mon,  1 Feb 2016 10:53:59 -0500
From:	Insu Yun <wuninsu@...il.com>
To:	ed.cashin@....org, linux-kernel@...r.kernel.org
Cc:	taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
	changwoo@...ech.edu, Insu Yun <wuninsu@...il.com>
Subject: [PATCH] aoe: remove unnecessary check for failing kthread creation

When kthread_run fails, it returns ERR, not NULL.
Therefore, NULL checking is redundant. 
(https://www.kernel.org/doc/htmldocs/device-drivers/API-kthread-run.html)

Signed-off-by: Insu Yun <wuninsu@...il.com>
---
 drivers/block/aoe/aoecmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index d048d20..4213114 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1327,7 +1327,7 @@ aoe_ktstart(struct ktstate *k)
 
 	init_completion(&k->rendez);
 	task = kthread_run(kthread, k, "%s", k->name);
-	if (task == NULL || IS_ERR(task))
+	if (IS_ERR(task))
 		return -ENOMEM;
 	k->task = task;
 	wait_for_completion(&k->rendez); /* allow kthread to start */
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ