Commit fb033dab authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

crypto: ccp - Fix return value check in ccp_dmaengine_register()

commit 7514e368 upstream.

Fix the retrn value check which testing the wrong variable
in ccp_dmaengine_register().

Fixes: 58ea8abf ("crypto: ccp - Register the CCP as a DMA resource")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarGary R Hook <gary.hook@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 38799498
...@@ -650,7 +650,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) ...@@ -650,7 +650,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp)
dma_desc_cache_name = devm_kasprintf(ccp->dev, GFP_KERNEL, dma_desc_cache_name = devm_kasprintf(ccp->dev, GFP_KERNEL,
"%s-dmaengine-desc-cache", "%s-dmaengine-desc-cache",
ccp->name); ccp->name);
if (!dma_cmd_cache_name) if (!dma_desc_cache_name)
return -ENOMEM; return -ENOMEM;
ccp->dma_desc_cache = kmem_cache_create(dma_desc_cache_name, ccp->dma_desc_cache = kmem_cache_create(dma_desc_cache_name,
sizeof(struct ccp_dma_desc), sizeof(struct ccp_dma_desc),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment