summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2019-08-07 20:20:36 -0500
committerJeff Epler <jepler@gmail.com>2019-08-07 20:20:36 -0500
commit500d1bb168e895a2661dfee5bb6cd293541c4a58 (patch)
tree0d1dd761548b287de00252a2c2275c25066e4ee2 /ports
parent39c64bf83c49571f572f3bc7ad91c10749ae3943 (diff)
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.
Diffstat (limited to 'ports')
-rw-r--r--ports/atmel-samd/audio_dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c
index 3cb90b86e..adf62942c 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);
}