class: use IS_ERR_OR_NULL() helper in class_unregister()
PATCH 1/1 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 <[email protected]>
--- drivers/base/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/class.c +1 -1
@@ -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);
Signature · 1 line
2.25.1
The following commit has been merged into the sched/psi branch of tip:
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 <[email protected]> AuthorDate: Mon, 22 Aug 2022 14:19:22 +08:00 Committer: Greg Kroah-Hartman <[email protected]> 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 <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/base/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/class.c +1 -1
@@ -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);
Greg Kroah-Hartman
maintainerQuoted 25 lines · On Fri, Sep 09, 2022 at 02:00:22PM -0000, tip-bot2 for Yang Yingliang wrote:
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 <[email protected]> AuthorDate: Mon, 22 Aug 2022 14:19:22 +08:00 Committer: Greg Kroah-Hartman <[email protected]> CommitterDate: Thu, 01 Sep 2022 18:15:40 +02:00class: use
IS_ERR_OR_NULL()helper inclass_unregister()Use
IS_ERR_OR_NULL()helper inclass_unregister()to simplify code.Signed-off-by Yang Yingliang <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/base/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/base/class.c +0
-0
drivers/base/class.c EXPORT_SYMBOL_GPL(__class_create); · line 266
Quoted 8 lines
drivers/base/class.c +1
-1@@ -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);
Any specific reason you pulled in my driver-core branch into tip?
confused,
greg k-h