summaryrefslogtreecommitdiff
path: root/usb/device
diff options
context:
space:
mode:
Diffstat (limited to 'usb/device')
-rw-r--r--usb/device/dfu/dfu_driver.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usb/device/dfu/dfu_driver.c b/usb/device/dfu/dfu_driver.c
index c6c1a18..f97073d 100644
--- a/usb/device/dfu/dfu_driver.c
+++ b/usb/device/dfu/dfu_driver.c
@@ -183,18 +183,16 @@ static int handle_upload(uint16_t val, uint16_t len, int first)
return DFU_RET_STALL;
}
- /* FIXME: altif */
rc = USBDFU_handle_upload(if_altsettings[0], dfu.total_bytes, dfu_buf, len);
if (rc < 0) {
TRACE_ERROR("application handle_upload() returned %d\n\r", rc);
return DFU_RET_STALL;
}
- rc = USBD_Write(0, dfu_buf, rc, &upload_cb, 0);
- if (rc == USBD_STATUS_SUCCESS)
- return DFU_RET_NOTHING;
- else
- return DFU_RET_STALL;
+ if (USBD_Write(0, dfu_buf, rc, &upload_cb, 0) == USBD_STATUS_SUCCESS)
+ return rc;
+
+ return DFU_RET_STALL;
}
/* this function gets daisy-chained into processing EP0 requests */
personal git repositories of Harald Welte. Your mileage may vary