espressif/spi: fix crash when rx buffer is NULL

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Neo Xu 2024-10-01 20:43:21 +08:00 committed by Xiang Xiao
parent c75d9565b2
commit 3636495f39

View file

@ -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;
}
}