Sfoglia il codice sorgente

Merge branch 'bugfix/spi_slave_dma_free_chan' into 'master'

spi_slave.c:fix DMA channel set to zero which might gets conflict with assert

See merge request espressif/esp-idf!6748
Angus Gratton 6 anni fa
parent
commit
e8089c1edb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      components/driver/spi_slave.c

+ 1 - 1
components/driver/spi_slave.c

@@ -218,7 +218,7 @@ cleanup:
     free(spihost[host]);
     spihost[host] = NULL;
     spicommon_periph_free(host);
-    spicommon_dma_chan_free(dma_chan);
+    if (dma_chan != 0) spicommon_dma_chan_free(dma_chan);
     return ret;
 }