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: <20240823052640.3668-1-zhangjiao2@cmss.chinamobile.com>
Date: Fri, 23 Aug 2024 13:26:40 +0800
From: zhangjiao2 <zhangjiao2@...s.chinamobile.com>
To: axboe@...nel.dk
Cc: justin@...aid.com,
	linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zhang Jiao <zhangjiao2@...s.chinamobile.com>
Subject: [PATCH] aoe: Use IS_ERR_OR_NULL() to clean code

From: Zhang Jiao <zhangjiao2@...s.chinamobile.com>

Use IS_ERR_OR_NULL() to make the code cleaner.

Signed-off-by: Zhang Jiao <zhangjiao2@...s.chinamobile.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 cc9077b588d7..5514b7a6e5c2 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1256,7 +1256,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_OR_NULL(task))
 		return -ENOMEM;
 	k->task = task;
 	wait_for_completion(&k->rendez); /* allow kthread to start */
-- 
2.33.0




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ