Skip to content

Commit

Permalink
USB: usb_wwan: remove redundant urb kill from port remove
Browse files Browse the repository at this point in the history
Remove redundant usb_kill_urb from port remove, which is called
post-shutdown (close).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed May 27, 2014
1 parent a427c17 commit 2b4acea
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/serial/usb_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,20 +546,17 @@ int usb_wwan_port_remove(struct usb_serial_port *port)
portdata = usb_get_serial_port_data(port);
usb_set_serial_port_data(port, NULL);

/* Stop reading/writing urbs and free them */
for (i = 0; i < N_IN_URB; i++) {
usb_kill_urb(portdata->in_urbs[i]);
usb_free_urb(portdata->in_urbs[i]);
free_page((unsigned long)portdata->in_buffer[i]);
}
for (i = 0; i < N_OUT_URB; i++) {
usb_kill_urb(portdata->out_urbs[i]);
usb_free_urb(portdata->out_urbs[i]);
kfree(portdata->out_buffer[i]);
}

/* Now free port private data */
kfree(portdata);

return 0;
}
EXPORT_SYMBOL(usb_wwan_port_remove);
Expand Down

0 comments on commit 2b4acea

Please sign in to comment.