+ usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
has been added to the -mm tree.  Its filename is
     usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
From: Josh Triplett <josh@xxxxxxxxxx>

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@xxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/usb/core/endpoint.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/usb/core/endpoint.c~usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err drivers/usb/core/endpoint.c
--- a/drivers/usb/core/endpoint.c~usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err
+++ a/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;
 	}
 
_

Patches currently in -mm which might be from josh@xxxxxxxxxx are

usb-in-init_endpoint_class-use-ptr_err-to-obtain-an-errno-value-not-is_err.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux