From: Jani Nikula <ext-jani.1.nikula@nokia.com>
To: linux-kernel@vger.kernel.org, James.Bottomley@suse.de
Cc: akpm@linux-foundation.org, ext-jani.1.nikula@nokia.com
Subject: [PATCH] enclosure: fix error path - actually return ERR_PTR() on error
Date: Fri, 12 Mar 2010 15:50:58 +0200 [thread overview]
Message-ID: <1268401858-9213-1-git-send-email-ext-jani.1.nikula@nokia.com> (raw)
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
---
NOTE: I'm afraid I'm unable to test this; please consider this more a
bug report than a complete patch.
---
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 1eac626..2979927 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -285,7 +285,7 @@ enclosure_component_register(struct enclosure_device *edev,
err = device_register(cdev);
if (err)
- ERR_PTR(err);
+ return ERR_PTR(err);
return ecomp;
}
--
1.6.5.2
next reply other threads:[~2010-03-12 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 13:50 Jani Nikula [this message]
2010-03-12 22:14 ` 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=1268401858-9213-1-git-send-email-ext-jani.1.nikula@nokia.com \
--to=ext-jani.1.nikula@nokia.com \
--cc=James.Bottomley@suse.de \
--cc=akpm@linux-foundation.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
all inboxes | Powered by JetHome®