USB: fix linked list insertion bugfix for usb core
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>
This commit is contained in:
parent
ce05916f6b
commit
e5dd01154c
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user