From 500d1bb168e895a2661dfee5bb6cd293541c4a58 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 7 Aug 2019 20:20:36 -0500 Subject: [PATCH] samd: audio_dma.c: Remove exceptions, just return early These were most useful debugging, but because this code can be reached "outside of the VM", it's not actually permitted to throw exceptions here. --- ports/atmel-samd/audio_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c index 3cb90b86e1..adf62942c1 100644 --- a/ports/atmel-samd/audio_dma.c +++ b/ports/atmel-samd/audio_dma.c @@ -52,13 +52,13 @@ uint8_t find_free_audio_dma_channel(void) { void audio_dma_disable_channel(uint8_t channel) { if (channel >= AUDIO_DMA_CHANNEL_COUNT) - mp_raise_RuntimeError(translate("Internal error: disable invalid dma channel")); + return; dma_disable_channel(channel); } void audio_dma_enable_channel(uint8_t channel) { if (channel >= AUDIO_DMA_CHANNEL_COUNT) - mp_raise_RuntimeError(translate("Internal error: enable invalid dma channel")); + return; dma_enable_channel(channel); }