[PATCH 2/2] scsi: ses: Remove unnecessary error check

From: Arvind Yadav
Date: Sat Nov 11 2017 - 10:16:49 EST


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@xxxxxxxxx>
---
drivers/misc/enclosure.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index c4c5552..5a17bfe 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -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)
--
2.7.4