From 6178e9597806033529fdd52c1678f3a7c92510d5 Mon Sep 17 00:00:00 2001 From: Aneesh Bansal Date: Thu, 11 Feb 2016 14:36:51 +0530 Subject: [PATCH] drivers/crypto/fsl: correct error checking in run_descriptor When CAAM runs a descriptor and an error occurs, a non-zero value is set in Output Status Register. The if condition should check the status for a non-zero value. Signed-off-by: Aneesh Bansal Reviewed-by: York Sun --- drivers/crypto/fsl/jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index b766470ce2..93c24712d1 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -360,7 +360,7 @@ int run_descriptor_jr(uint32_t *desc) } } - if (!op.status) { + if (op.status) { debug("Error %x\n", op.status); ret = op.status; } -- 2.39.5