All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@kernel.org>
To: linux-kernel@vger.kernel.org, linux-usb-devel@vger.kernel.org
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: Wed, 24 Jan 2007 14:10:14 -0800	[thread overview]
Message-ID: <45B7D946.90005@kernel.org> (raw)

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(-)

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;
 	}
 

             reply	other threads:[~2007-01-24 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 22:10 Josh Triplett [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-01-25  9:32 [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=45B7D946.90005@kernel.org \
    --to=josh@kernel.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.