[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230920115208.2733-1-wangkaiyuan@inspur.com>
Date: Wed, 20 Sep 2023 19:52:08 +0800
From: wangkaiyuan <wangkaiyuan@...pur.com>
To: <ed.cashin@....org>, <axboe@...nel.dk>
CC: <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
wangkaiyuan <wangkaiyuan@...pur.com>
Subject: [PATCH] aoe: Use helper function IS_ERR_OR_NULL()
Use IS_ERR_OR_NULL() to detect an error pointer or a null pointer
open-coding to simplify the code.
Signed-off-by: wangkaiyuan <wangkaiyuan@...pur.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 d7317425be51..94a7aa6cf58a 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(backend))
return -ENOMEM;
k->task = task;
wait_for_completion(&k->rendez); /* allow kthread to start */
--
2.31.1
Powered by blists - more mailing lists