Commit 750b54de authored by Arvind Yadav's avatar Arvind Yadav Committed by 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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 367ef846
......@@ -680,13 +680,7 @@ ATTRIBUTE_GROUPS(enclosure_component);
static int __init enclosure_init(void)
{
int err;
err = class_register(&enclosure_class);
if (err)
return err;
return 0;
return class_register(&enclosure_class);
}
static void __exit enclosure_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment