Commit ebcabc1a authored by Daniel Drake's avatar Daniel Drake

uru4000: avoid cancelling a completed transfer

parent 870ddfb9
......@@ -467,9 +467,13 @@ static void image_cb(struct libusb_transfer *transfer)
struct fp_img *img;
int r = 0;
/* remove the global reference early: otherwise we may report results,
* leading to immediate deactivation of driver, which will potentially
* try to cancel an already-completed transfer */
urudev->img_transfer = NULL;
if (transfer->status == LIBUSB_TRANSFER_CANCELLED) {
urudev->img_transfer = NULL;
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