diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 0ffdfd9a1c9d..d3cc2c512ccf 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2128,11 +2128,8 @@ static int d40_allocate_channel(struct d40_chan *d40c, bool *first_phy_user) if (d40c->dma_cfg.use_fixed_channel) { i = d40c->dma_cfg.phy_channel; - if ((i != phy_num) && (i != phy_num + 1)) { - dev_err(dmaengine_chan_dev(&d40c->chan), - "invalid fixed phy channel %d\n", i); - return -EINVAL; - } + if (i != phy_num && i != phy_num + 1) + continue; if (d40_alloc_mask_set(&phys[i], is_src, event_line, is_log, first_phy_user))