[U-Boot] [PATCH] drivers/crypto/fsl: correct error checking in run_descriptor

Aneesh Bansal aneesh.bansal at nxp.com
Thu Feb 11 10:06:51 CET 2016


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 <aneesh.bansal at nxp.com>
---
 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 b553e3c..f4069b5 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -353,7 +353,7 @@ int run_descriptor_jr(uint32_t *desc)
 		}
 	}
 
-	if (!op.status) {
+	if (op.status) {
 		debug("Error %x\n", op.status);
 		ret = op.status;
 	}
-- 
1.8.1.4



More information about the U-Boot mailing list