drivers: usb_device: smartbond: Fix unnecessary flush

Switching from write to read on EP0 is done when data is
Additionally receiver is enabled when NAK is created in
response to OUT token. This may happen when host sent
ZLP before everything was transmitted.
This case flushed receiver FIFO which could lead to
setup packet corruption.

Signed-off-by: Jerzy Kasenberg <>
1 file changed