Skip to content
Permalink
Browse files

usb_dc_stm32: Don't update ret_bytes if send fails in usb_dc_ep_write()

Don't update ret_bytes if send fails in usb_dc_ep_write().

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
  • Loading branch information...
ydamigos authored and nashif committed Jun 30, 2019
1 parent e217c1b commit 2d537f49a92f4180f6457195c8f3df3170be3230
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/usb/device/usb_dc_stm32.c
@@ -767,7 +767,7 @@ int usb_dc_ep_write(const u8_t ep, const u8_t *const data,
irq_enable(DT_USB_IRQ);
}

if (ret_bytes) {
if (!ret && ret_bytes) {
*ret_bytes = len;
}

0 comments on commit 2d537f4

Please sign in to comment.
You can’t perform that action at this time.