Skip to content

Commit

Permalink
Improve processing of URB sending errors
Browse files Browse the repository at this point in the history
  • Loading branch information
klogg committed May 10, 2024
1 parent 64d37e8 commit dc6702d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fl2000_streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ static void fl2000_stream_work(struct work_struct *work)
ret = down_interruptible(&stream->work_sem);
if (ret) {
dev_err(&usb_dev->dev, "Work interrupt error %d", ret);
break;
stream->enabled = false;
return;
}

spin_lock_irq(&stream->list_lock);
Expand Down Expand Up @@ -211,7 +212,8 @@ static void fl2000_stream_work(struct work_struct *work)
data_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!data_urb) {
dev_err(&usb_dev->dev, "Data URB allocation error");
break;
stream->enabled = false;
return;
}

/* Endpoint 1 bulk out. We store pointer to current stream buffer structure in
Expand Down

0 comments on commit dc6702d

Please sign in to comment.