mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 15:54:57 +08:00
espressif/spi: fix crash when rx buffer is NULL
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
@@ -847,12 +847,12 @@ static void esp_spi_poll_exchange(struct esp_spi_priv_s *priv,
|
||||
|
||||
if (rp != NULL)
|
||||
{
|
||||
rp += transfer_size;
|
||||
spi_hal_fetch_result(priv->ctx);
|
||||
}
|
||||
|
||||
bytes_remaining -= transfer_size;
|
||||
tp += transfer_size;
|
||||
rp += transfer_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user