drivers: dma: stm32 dmamux has request 0 for mem-to-mem

The request ID = 0 is allowed for mem-to-mem data
transfer through the DMAMUX.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-05-07 14:23:12 +02:00 committed by Kumar Gala
commit aa2e915fbf

View file

@ -94,8 +94,7 @@ int dmamux_stm32_configure(const struct device *dev, uint32_t id,
*/ */
int request_id = config->dma_slot; int request_id = config->dma_slot;
if (request_id == 0 || if (request_id > dev_config->req_nb + dev_config->gen_nb) {
request_id > dev_config->req_nb + dev_config->gen_nb) {
LOG_ERR("request ID %d is not valid.", request_id); LOG_ERR("request ID %d is not valid.", request_id);
return -EINVAL; return -EINVAL;
} }