crypto: ccp - Fix return value check in ccp_dmaengine_register()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 17 Sep 2016 16:01:22 +0000 (16:01 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 10:32:47 +0000 (18:32 +0800)
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 <weiyongjun1@huawei.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dmaengine.c

index 2e5a05ce0e3e9d12dc4a32b752faa3da35ba3bd9..6553912804f73f1c061aec9bdd3afd0f0d7426bc 100644 (file)
@@ -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;
        }