LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
@ 2007-01-24 22:10 Josh Triplett
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2007-01-24 22:10 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel; +Cc: Andrew Morton, usb-hacking

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
@ 2007-01-25  9:32 Josh Triplett
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2007-01-25  9:32 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel; +Cc: Andrew Morton, usb-hacking

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-25  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-24 22:10 [PATCH] USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR Josh Triplett
2007-01-25  9:32 Josh Triplett

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