Skip to content

Commit b97a367

Browse files
ajf58kartben
authored andcommitted
drivers: dma: rpi_pico: Correct handling of NULL filter_param
From the API documentation, `dma_api_chan_filter`` can be given a value of NULL for `filter_param`. Match the behaviour of most implementations, and return true. This removes misleading error messages logged during tests (e.g. `test_tst_dma0_m2m_loop`). Signed-off-by: Andrew Featherstone <[email protected]>
1 parent 92256f4 commit b97a367

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/dma/dma_rpi_pico.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ static bool dma_rpi_pico_api_chan_filter(const struct device *dev, int ch, void
288288
uint32_t filter;
289289

290290
if (!filter_param) {
291-
LOG_ERR("filter_param must not be NULL");
292-
return false;
291+
return true;
293292
}
294293

295294
filter = *((uint32_t *)filter_param);

0 commit comments

Comments
 (0)