drivers: spi: spi_esp32_spim: Remove check for NULL before freeing
As per k_free() documentation it accepts a NULL argument. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
parent
1eff8e76bd
commit
6c3998d494
|
@ -133,13 +133,8 @@ static int IRAM_ATTR spi_esp32_transfer(const struct device *dev)
|
|||
|
||||
spi_context_update_rx(&data->ctx, data->dfs, chunk_len);
|
||||
|
||||
if (tx_temp) {
|
||||
k_free(tx_temp);
|
||||
}
|
||||
|
||||
if (rx_temp) {
|
||||
k_free(rx_temp);
|
||||
}
|
||||
k_free(tx_temp);
|
||||
k_free(rx_temp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue