parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code

Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Yang Yingliang 2023-08-09 17:19:53 +08:00 committed by Helge Deller
parent a0f4b7879f
commit 56cf894eff

View File

@ -354,10 +354,8 @@ static int __init pdt_initcall(void)
return -ENODEV;
kpdtd_task = kthread_run(pdt_mainloop, NULL, "kpdtd");
if (IS_ERR(kpdtd_task))
return PTR_ERR(kpdtd_task);
return 0;
return PTR_ERR_OR_ZERO(kpdtd_task);
}
late_initcall(pdt_initcall);