dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
stable inclusion from stable-v5.10.130 commit 1be247db203ed5cdd1bbd2c2588cef2185600531 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5YRJO Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1be247db203ed5cdd1bbd2c2588cef2185600531 -------------------------------- commit 3770d92b upstream. 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: e1f7c9ee ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: NMichael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20220526135111.1470926-1-michael@walle.ccSigned-off-by: NVinod Koul <vkoul@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录