Skip to content

Commit 41ef267

Browse files
committed
Fixup the QSPI transfer result check
The result could < 0 (with error number) now. Signed-off-by: GuEe-GUI <[email protected]>
1 parent 7735d13 commit 41ef267

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/drivers/spi/dev_qspi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ rt_err_t rt_qspi_send_then_recv(struct rt_qspi_device *device, const void *send_
206206
{
207207
result = -RT_EIO;
208208
}
209-
else
209+
else if (result > 0)
210210
{
211211
result = recv_length;
212212
}

0 commit comments

Comments
 (0)