Commit 86067eea authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: fix oops in acm disconnect

this fixes an oops with disconnection in acm.
Signed-off-by: default avatarOliver Neukum <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 8e695cdb
......@@ -1014,8 +1014,13 @@ static void acm_disconnect(struct usb_interface *intf)
if (!usb_get_intfdata(intf)) {
acm->dev = NULL;
usb_set_intfdata (intf, NULL);
usb_set_intfdata(acm->control, NULL);
usb_set_intfdata(acm->data, NULL);
......@@ -1036,7 +1041,7 @@ static void acm_disconnect(struct usb_interface *intf)
for (i = 0; i < ACM_NRB; i++)
usb_buffer_free(usb_dev, acm->readsize, acm->rb[i].base, acm->rb[i].dma);
usb_driver_release_interface(&acm_driver, acm->data);
usb_driver_release_interface(&acm_driver, intf == acm->control ? acm->data : intf);
if (!acm->used) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment