From: Josh Triplett <josh@freedesktop.org>
To: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@osdl.org>, usb-hacking@psas.pdx.edu
Subject: [PATCH] USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
Date: Thu, 25 Jan 2007 01:32:34 -0800 [thread overview]
Message-ID: <45B87932.1070803@freedesktop.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
init_endpoint_class calls class_create, and checks the result for an error
with IS_ERR; however, if true, it then returns the result of IS_ERR (a
boolean) rather than PTR_ERR (the actual errno).
Signed-off-by: Josh Triplett <josh@kernel.org>
---
drivers/usb/core/endpoint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Resent with correct address for linux-usb-devel; for others, sorry for the
duplicate.
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c
index 5e628ae..e0ec704 100644
--- a/drivers/usb/core/endpoint.c
+++ b/drivers/usb/core/endpoint.c
@@ -229,7 +229,7 @@ static int init_endpoint_class(void)
kref_init(&ep_class->kref);
ep_class->class = class_create(THIS_MODULE, "usb_endpoint");
if (IS_ERR(ep_class->class)) {
- result = IS_ERR(ep_class->class);
+ result = PTR_ERR(ep_class->class);
goto class_create_error;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next reply other threads:[~2007-01-25 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 9:32 Josh Triplett [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-01-24 22:10 [PATCH] USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR Josh Triplett
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=45B87932.1070803@freedesktop.org \
--to=josh@freedesktop.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=usb-hacking@psas.pdx.edu \
/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