Skip to content

Commit

Permalink
parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Helge Deller committed Aug 10, 2023
1 parent a0f4b78 commit 56cf894
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/parisc/kernel/pdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 56cf894

Please sign in to comment.