diff mbox

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

Message ID 1455181611-11584-1-git-send-email-aneesh.bansal@nxp.com
State Accepted
Commit 6178e9597806033529fdd52c1678f3a7c92510d5
Delegated to: York Sun
Headers show

Commit Message

Aneesh Bansal Feb. 11, 2016, 9:06 a.m. UTC
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@nxp.com>
---
 drivers/crypto/fsl/jr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

York Sun March 22, 2016, 3:34 p.m. UTC | #1
On 02/11/2016 01:09 AM, Aneesh Bansal wrote:
> 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@nxp.com>
> ---
>  drivers/crypto/fsl/jr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-fsl-qoriq, awaiting upstream.

Thanks.

York
diff mbox

Patch

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;
 	}