]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: fix linked list insertion bugfix for usb core
authorNathael Pajani <nathael.pajani@cpe.fr>
Tue, 11 Sep 2007 16:46:48 +0000 (09:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 26 Sep 2007 17:54:37 +0000 (10:54 -0700)
commit e5dd01154c1e9ca2400f4682602d1a4fa54c25dd in mainline.

This patch fixes the order of list_add_tail() arguments in
usb_store_new_id() so the list can have more than one single element.

Signed-off-by: Nathael Pajani <nathael.pajani@cpe.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c

index 2619986e53000f95667365157193dd1dec0d3453..61699f78289c05a42a7e2e3760517e04107abc67 100644 (file)
@@ -58,7 +58,7 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids,
        dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE;
 
        spin_lock(&dynids->lock);
-       list_add_tail(&dynids->list, &dynid->node);
+       list_add_tail(&dynid->node, &dynids->list);
        spin_unlock(&dynids->lock);
 
        if (get_driver(driver)) {