Skip to content

Commit

Permalink
USB: fix linked list insertion bugfix for usb core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nathael Pajani authored and Greg Kroah-Hartman committed Sep 11, 2007
1 parent ce05916 commit e5dd011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e5dd011

Please sign in to comment.