[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 09 Sep 2022 14:00:22 -0000
From: "tip-bot2 for Yang Yingliang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Yang Yingliang <yangyingliang@...wei.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/psi] class: use IS_ERR_OR_NULL() helper in class_unregister()
The following commit has been merged into the sched/psi branch of tip:
Commit-ID: e9628e015fe205f10766f031f17e217f85650570
Gitweb: https://git.kernel.org/tip/e9628e015fe205f10766f031f17e217f85650570
Author: Yang Yingliang <yangyingliang@...wei.com>
AuthorDate: Mon, 22 Aug 2022 14:19:22 +08:00
Committer: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CommitterDate: Thu, 01 Sep 2022 18:15:40 +02:00
class: use IS_ERR_OR_NULL() helper in class_unregister()
Use IS_ERR_OR_NULL() helper in class_unregister() to simplify code.
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
Link: https://lore.kernel.org/r/20220822061922.3884113-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/base/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8feb85e..64f7b9a 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
*/
void class_destroy(struct class *cls)
{
- if ((cls == NULL) || (IS_ERR(cls)))
+ if (IS_ERR_OR_NULL(cls))
return;
class_unregister(cls);
Powered by blists - more mailing lists