Commit b94e7ae2 authored by Borislav Petkov's avatar Borislav Petkov Committed by Greg Kroah-Hartman

[PATCH] USB: remove calls to usb_unlink_urb() in net/kaweth.c

Hi there Greg,
  here's another one.
Signed-off-by: default avatarBorislav Petkov <petkov@uni-muenster.de>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 5b667dd0
......@@ -674,7 +674,7 @@ static int kaweth_open(struct net_device *net)
res = usb_submit_urb(kaweth->irq_urb, GFP_KERNEL);
if (res) {
usb_unlink_urb(kaweth->rx_urb);
usb_kill_urb(kaweth->rx_urb);
return -EIO;
}
......@@ -695,15 +695,15 @@ static int kaweth_close(struct net_device *net)
kaweth->status |= KAWETH_STATUS_CLOSING;
usb_unlink_urb(kaweth->irq_urb);
usb_unlink_urb(kaweth->rx_urb);
usb_kill_urb(kaweth->irq_urb);
usb_kill_urb(kaweth->rx_urb);
flush_scheduled_work();
/* a scheduled work may have resubmitted,
we hit them again */
usb_unlink_urb(kaweth->irq_urb);
usb_unlink_urb(kaweth->rx_urb);
usb_kill_urb(kaweth->irq_urb);
usb_kill_urb(kaweth->rx_urb);
kaweth->status &= ~KAWETH_STATUS_CLOSING;
......@@ -1173,8 +1173,8 @@ static void kaweth_disconnect(struct usb_interface *intf)
}
kaweth->removed = 1;
usb_unlink_urb(kaweth->irq_urb);
usb_unlink_urb(kaweth->rx_urb);
usb_kill_urb(kaweth->irq_urb);
usb_kill_urb(kaweth->rx_urb);
/* we need to wait for the urb to be cancelled, if it is active */
spin_lock(&kaweth->device_lock);
......@@ -1260,7 +1260,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
if (!timeout) {
// timeout
kaweth_warn("usb_control/bulk_msg: timeout");
usb_unlink_urb(urb); // remove urb safely
usb_kill_urb(urb); // remove urb safely
status = -ETIMEDOUT;
}
else {
......
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