crypto: ccp - Release dma channels before dmaengine unrgister
authorKoba Ko <koba.ko@canonical.com>
Thu, 1 Sep 2022 14:47:12 +0000 (22:47 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Sep 2022 08:18:33 +0000 (16:18 +0800)
commit68dbe80f5b510c66c800b9e8055235c5b07e37d1
tree38bcd9a5f427fd0927b2fa0ca0aef71897a96b47
parent24ddd4e1dbfcf530b89c3d994789cc2e57cbe713
crypto: ccp - Release dma channels before dmaengine unrgister

A warning is shown during shutdown,

__dma_async_device_channel_unregister called while 2 clients hold a reference
WARNING: CPU: 15 PID: 1 at drivers/dma/dmaengine.c:1110 __dma_async_device_channel_unregister+0xb7/0xc0

Call dma_release_channel for occupied channles before dma_async_device_unregister.

Fixes: 54cce8ecb925 ("crypto: ccp - ccp_dmaengine_unregister release dma channels")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dmaengine.c