drivers: spi: xmc4xxx: Fix potential runtime error
Fixes an unhandled interrupt runtime crash if CONFIG_SPI_XMC4XXX_DMA=y and CONFIG_SPI_XMC4XXX_INTERRUPT=n. The unhandled interrupt error is triggered because irq_enable() was called without calling IRQ_CONNECT() when CONFIG_SPI_XMC4XXX_INTERRUPT=n. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
parent
8246d14742
commit
a34d4d1ce9
|
@ -468,7 +468,9 @@ static int spi_xmc4xxx_transceive_dma(const struct device *dev, const struct spi
|
|||
spi_context_cs_control(ctx, false);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SPI_XMC4XXX_INTERRUPT)
|
||||
irq_enable(config->irq_num_rx);
|
||||
#endif
|
||||
spi_context_release(ctx, ret);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
CONFIG_SPI_XMC4XXX_INTERRUPT=y
|
||||
CONFIG_SPI_XMC4XXX_DMA=y
|
||||
CONFIG_SPI_LOOPBACK_MODE_LOOP=y
|
||||
|
|
Loading…
Reference in New Issue