diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-29 08:08:32 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-07 12:45:31 -0500 |
commit | 750b54deb569369f8cd808c9f7afd1348bde96ed (patch) | |
tree | f67eb8206914496035cab07ad67e450e8053fd11 | |
parent | 367ef846bbcaafb9aa4ae95552942134064e99f5 (diff) |
misc: enclosure: Remove unnecessary error check
It is not necessary to check return value of class_register.
enclosure_init returns both successful and error value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/enclosure.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index c4c5552abf14..5a17bfeb80d3 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c | |||
@@ -680,13 +680,7 @@ ATTRIBUTE_GROUPS(enclosure_component); | |||
680 | 680 | ||
681 | static int __init enclosure_init(void) | 681 | static int __init enclosure_init(void) |
682 | { | 682 | { |
683 | int err; | 683 | return class_register(&enclosure_class); |
684 | |||
685 | err = class_register(&enclosure_class); | ||
686 | if (err) | ||
687 | return err; | ||
688 | |||
689 | return 0; | ||
690 | } | 684 | } |
691 | 685 | ||
692 | static void __exit enclosure_exit(void) | 686 | static void __exit enclosure_exit(void) |