From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] scsi: ses: Remove unnecessary error check
Date: Sat, 11 Nov 2017 20:46:20 +0530 [thread overview]
Message-ID: <1510413380-13306-3-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1510413380-13306-1-git-send-email-arvind.yadav.cs@gmail.com>
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>
---
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
next prev parent reply other threads:[~2017-11-11 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 15:16 [PATCH 0/2] scsi: ses: Fix space before '[' and remove error check Arvind Yadav
2017-11-11 15:16 ` [PATCH 1/2] scsi: ses: Fix space before '[' error Arvind Yadav
2017-11-29 10:45 ` Greg KH
2017-11-11 15:16 ` Arvind Yadav [this message]
2017-11-29 10:45 ` [PATCH 2/2] scsi: ses: Remove unnecessary error check Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1510413380-13306-3-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).