From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-parisc@vger.kernel.org>
Cc: <James.Bottomley@HansenPartnership.com>, <deller@gmx.de>,
<yangyingliang@huawei.com>
Subject: [PATCH -next] parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code
Date: Wed, 9 Aug 2023 17:19:53 +0800 [thread overview]
Message-ID: <20230809091953.2821517-1-yangyingliang@huawei.com> (raw)
Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
arch/parisc/kernel/pdt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index 0d24735bd918..0f9b3b5914cf 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -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);
--
2.25.1
next reply other threads:[~2023-08-09 9:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 9:19 Yang Yingliang [this message]
2023-08-10 1:01 ` [PATCH -next] parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230809091953.2821517-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.