aoe: Use helper function IS_ERR_OR_NULL()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/block/aoe/aoecmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/aoe/aoecmd.c +1 -1
@@ -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 */
Signature · 1 line
2.31.1