On 09/17/2016 11:01 AM, Wei Yongjun wrote:
From: Wei Yongjun <weiyongj...@huawei.com>

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 <weiyongj...@huawei.com>
---
 drivers/crypto/ccp/ccp-dmaengine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp-dmaengine.c 
b/drivers/crypto/ccp/ccp-dmaengine.c
index 94f77b0..32f645e 100644
--- a/drivers/crypto/ccp/ccp-dmaengine.c
+++ b/drivers/crypto/ccp/ccp-dmaengine.c
@@ -650,7 +650,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)
                return -ENOMEM;
        ccp->dma_desc_cache = kmem_cache_create(dma_desc_cache_name,
                                                sizeof(struct ccp_dma_desc),


Acked-by: Gary R Hook <gary.h...@amd.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to