Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.

Change generated with coccinelle.

To: Justin Sanders <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Philipp Hahn <[email protected]>
---
 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 
a4744a30a8af4ff05113f3234021eec728265b4f..b31e539a66433a0a5d6e81117a32d12735ffc1bc
 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1268,7 +1268,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.43.0


Reply via email to