From: Wei Yongjun Date: Sat, 17 Sep 2016 16:01:22 +0000 (+0000) Subject: crypto: ccp - Fix return value check in ccp_dmaengine_register() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7514e3688811e610640ec2201ca14dfebfe13442;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: ccp - Fix return value check in ccp_dmaengine_register() Fix the retrn value check which testing the wrong variable in ccp_dmaengine_register(). Fixes: 58ea8abf4904 ("crypto: ccp - Register the CCP as a DMA resource") Signed-off-by: Wei Yongjun Acked-by: Gary R Hook Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 2e5a05ce0e3e..6553912804f7 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -648,7 +648,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) dma_desc_cache_name = devm_kasprintf(ccp->dev, GFP_KERNEL, "%s-dmaengine-desc-cache", ccp->name); - if (!dma_cmd_cache_name) { + if (!dma_desc_cache_name) { ret = -ENOMEM; goto err_cache; }