]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
authorMichael Walle <michael@walle.cc>
Thu, 26 May 2022 13:51:11 +0000 (15:51 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 5 Jul 2022 12:48:31 +0000 (18:18 +0530)
commit095d0c46a3e0e1235cb9cc233cf1600e39d4e7dc
treeea9d36abe5ef5e4add845125d126cf088a9582a5
parent1fd7d7f95e711f5f3732771f2107b2238d35ec1c
dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly

It seems that it is valid to have less than the requested number of
descriptors. But what is not valid and leads to subsequent errors is to
have zero descriptors. In that case, abort the probing.

Fixes: 73a1e1f6d727 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220526135111.1470926-1-michael@walle.cc
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/at_xdmac.c