This is a note to let you know that I've just added the patch titled
Subject: [PATCH 2/2] usbcore: fix endpoint device creation
to my gregkh-2.6 tree. Its filename is
usbcore-fix-endpoint-device-creation.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [EMAIL PROTECTED] Tue Oct 10 08:56:58 2006
Date: Tue, 10 Oct 2006 11:56:26 -0400 (EDT)
From: Alan Stern <[EMAIL PROTECTED]>
To: Greg KH <[EMAIL PROTECTED]>
cc: USB development list <[email protected]>
Subject: [PATCH 2/2] usbcore: fix endpoint device creation
Message-ID: <[EMAIL PROTECTED]>
This patch (as800) straightens out the USB endpoint class device
creation routine, fixing a refcount bug in the process.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
drivers/usb/core/endpoint.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
--- gregkh-2.6.orig/drivers/usb/core/endpoint.c
+++ gregkh-2.6/drivers/usb/core/endpoint.c
@@ -223,7 +223,7 @@ int usb_create_ep_files(struct device *p
ep_dev = kzalloc(sizeof(*ep_dev), GFP_KERNEL);
if (!ep_dev) {
retval = -ENOMEM;
- goto exit;
+ goto error_alloc;
}
/* fun calculation to determine the minor of this endpoint */
@@ -241,33 +241,31 @@ int usb_create_ep_files(struct device *p
retval = device_register(&ep_dev->dev);
if (retval)
- goto error;
+ goto error_register;
retval = sysfs_create_group(&ep_dev->dev.kobj, &ep_dev_attr_grp);
if (retval)
goto error_group;
- endpoint->ep_dev = ep_dev;
-
/* create the symlink to the old-style "ep_XX" directory */
sprintf(name, "ep_%02x", endpoint->desc.bEndpointAddress);
- retval = sysfs_create_link(&parent->kobj,
- &endpoint->ep_dev->dev.kobj, name);
+ retval = sysfs_create_link(&parent->kobj, &ep_dev->dev.kobj, name);
if (retval)
goto error_link;
-exit:
+ endpoint->ep_dev = ep_dev;
return retval;
error_link:
sysfs_remove_group(&ep_dev->dev.kobj, &ep_dev_attr_grp);
-
error_group:
device_unregister(&ep_dev->dev);
- endpoint->ep_dev = NULL;
destroy_endpoint_class();
return retval;
-error:
+
+error_register:
kfree(ep_dev);
+error_alloc:
destroy_endpoint_class();
+exit:
return retval;
}
Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are
driver/driver-core-don-t-ignore-error-returns-from-probing.patch
usb/usb-unusual_devs-entry-for-nokia-6131.patch
usb/ehci-hcd-fix-budget_pool-allocation-for-machines-with-multiple-ehci-controllers.patch
usb/uhci-workaround-for-asus-motherboard.patch
usb/usbcore-fix-endpoint-device-creation.patch
usb/usbcore-fix-refcount-bug-in-endpoint-removal.patch
usb/usb-takes-31-devices-per-hub.patch
usb/usb-hub-root-hub-code-takes-more-than-15-devices.patch
ehci-repair-remote-wakeup-support.patch
usb-hub-autosuspend-autoresume.patch
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel