zephyr/drivers/usb/device
Aurelien Jarno 92f7c7c3b5 drivers: usb_dc_sam: kill a coverity warning
Coverity complains that packet_len can get assigned a negative value if
usb_dc_ep_mps() returns an error. This is correct, however it only
happens if the endpoint address is invalid, and in that case the value
is not used as the endpoint address is also validated in
usb_dc_ep_write().

Fix the issue by moving the assignment after the endpoint address
validation and by accessing the value directly instead of getting it
through usb_dc_ep_mps().

Fixes #11481
Coverity-CID: 189742

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-23 09:19:44 -05:00
..
CMakeLists.txt drivers: usb: add usb device driver for Atmel SAM E70 family 2018-11-06 16:32:35 -05:00
Kconfig drivers: usb: add usb device driver for Atmel SAM E70 family 2018-11-06 16:32:35 -05:00
usb_dc_dw.c usb: logs: Rename USB_WRN to LOG_WRN 2018-11-08 08:35:20 -05:00
usb_dc_kinetis.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
usb_dc_nrfx.c usb: add SoF event 2018-11-23 09:18:41 -05:00
usb_dc_sam0.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
usb_dc_sam.c drivers: usb_dc_sam: kill a coverity warning 2018-11-23 09:19:44 -05:00
usb_dc_stm32.c drivers: usb_dc_stm32: Use DT to check if USBPHYC exists 2018-11-15 07:27:23 -06:00
usb_dw_registers.h drivers: Remove board.h include 2018-11-01 13:21:11 -04:00