espressif/spi: fix crash when rx buffer is NULL
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
parent
c75d9565b2
commit
3636495f39
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue