We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a0bcca commit c7da55eCopy full SHA for c7da55e
drivers/spi/spi_smartbond.c
@@ -796,11 +796,13 @@ static void spi_smartbond_dma_deconfig(const struct device *dev)
796
{
797
const struct spi_smartbond_cfg *config = dev->config;
798
799
- dma_stop(config->rx_dma_ctrl, config->rx_dma_chan);
800
- dma_stop(config->tx_dma_ctrl, config->tx_dma_chan);
+ if (config->rx_dma_ctrl && config->tx_dma_ctrl) {
+ dma_stop(config->rx_dma_ctrl, config->rx_dma_chan);
801
+ dma_stop(config->tx_dma_ctrl, config->tx_dma_chan);
802
- spi_smartbond_dma_rx_channel_release(dev);
803
- spi_smartbond_dma_tx_channel_release(dev);
+ spi_smartbond_dma_rx_channel_release(dev);
804
+ spi_smartbond_dma_tx_channel_release(dev);
805
+ }
806
}
807
#endif
808
0 commit comments