USB: fix linked list insertion bugfix for usb core
authorNathael Pajani <nathael.pajani@cpe.fr>
Tue, 4 Sep 2007 09:46:23 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 Sep 2007 14:48:15 +0000 (07:48 -0700)
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c

index a1ad11d0c47cacaa2b5b2a3fdd4ff7c0a62d563f..63b1243a9139d7071a221255bdacde5e524b5996 100644 (file)
@@ -60,7 +60,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)) {