From: Kulikov Vasiliy <segooon@gmail.com>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: James Bottomley <James.Bottomley@suse.de>,
Tejun Heo <tj@kernel.org>,
David Brownell <dbrownell@users.sourceforge.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] enclosure: fix lost return
Date: Tue, 6 Jul 2010 19:28:07 +0400 [thread overview]
Message-ID: <1278430088-9761-1-git-send-email-segooon@gmail.com> (raw)
Useless statement must be return with argument.
This patch silences a compiler warning:
drivers/misc/enclosure.c: In function ‘enclosure_component_register’:
drivers/misc/enclosure.c:289: warning: ignoring return value of ‘ERR_PTR’, declared with attribute warn_unused_result
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/misc/enclosure.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 48c84a5..9ae7bef 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -286,7 +286,7 @@ enclosure_component_register(struct enclosure_device *edev,
err = device_register(cdev);
if (err)
- ERR_PTR(err);
+ return ERR_PTR(err);
return ecomp;
}
--
1.7.0.4
next reply other threads:[~2010-07-06 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 15:28 Kulikov Vasiliy [this message]
2010-07-06 15:39 ` James Bottomley
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=1278430088-9761-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=dbrownell@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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
all inboxes | Powered by JetHome®