提交 750b54de 编写于 作者: A Arvind Yadav 提交者: Greg Kroah-Hartman

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: NArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 367ef846
...@@ -680,13 +680,7 @@ ATTRIBUTE_GROUPS(enclosure_component); ...@@ -680,13 +680,7 @@ ATTRIBUTE_GROUPS(enclosure_component);
static int __init enclosure_init(void) static int __init enclosure_init(void)
{ {
int err; return class_register(&enclosure_class);
err = class_register(&enclosure_class);
if (err)
return err;
return 0;
} }
static void __exit enclosure_exit(void) static void __exit enclosure_exit(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册