Commit da44e962 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: fix an unlinking race in speedtouch driver

checking for -EINPROGRESS is wrong.
parent 5e03c83e
...@@ -852,8 +852,7 @@ static int udsl_usb_data_exit (struct udsl_instance_data *instance) ...@@ -852,8 +852,7 @@ static int udsl_usb_data_exit (struct udsl_instance_data *instance)
if ((!ctx->urb) || (!ctx->skb)) if ((!ctx->urb) || (!ctx->skb))
continue; continue;
if (ctx->urb->status == -EINPROGRESS) usb_unlink_urb (ctx->urb);
usb_unlink_urb (ctx->urb);
usb_free_urb (ctx->urb); usb_free_urb (ctx->urb);
kfree_skb (ctx->skb); kfree_skb (ctx->skb);
...@@ -863,8 +862,7 @@ static int udsl_usb_data_exit (struct udsl_instance_data *instance) ...@@ -863,8 +862,7 @@ static int udsl_usb_data_exit (struct udsl_instance_data *instance)
for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) {
struct udsl_usb_send_data_context *ctx = &(instance->send_ctx[i]); struct udsl_usb_send_data_context *ctx = &(instance->send_ctx[i]);
if (ctx->urb->status == -EINPROGRESS) usb_unlink_urb (ctx->urb);
usb_unlink_urb (ctx->urb);
if (ctx->skb) if (ctx->skb)
ctx->vcc->pop (ctx->vcc, ctx->skb); ctx->vcc->pop (ctx->vcc, ctx->skb);
......
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