Skip to contentSkip to conversation

crypto/fsl: Fix RNG instantiation failure.

PATCH New Gaurav Rana 2 participants 2 messages Dec 4, 2014 – Dec 16, 2014 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 crypto/fsl: Fix RNG instantiation failure.

Corrected the order of arguments in memset in run_descriptor function. Wrong order of argumnets led to improper initialization of members of struct type result. This resulted in RNG instantiation error.

---
Changes from v1:
Corrected typo in Subject message

 drivers/crypto/fsl/jr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/fsl/jr.c +1 -1
index 29681e1..f9d4938 100644
@@ -246,7 +246,7 @@ int run_descriptor_jr(uint32_t *desc)
 	struct result op;
 	int ret = 0;
 
-	memset(&op, sizeof(op), 0);
+	memset(&op, 0, sizeof(op));
 
 	ret = jr_enqueue(desc, desc_done, &op);
 	if (ret) {
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH v2 1/1 crypto/fsl: Fix RNG instantiation failure.

Quoted 10 lines · Gaurav Rana

Corrected the order of arguments in memset in run_descriptor function. Wrong order of argumnets led to improper initialization of members of struct type result. This resulted in RNG instantiation error.

---
Changes from v1:
Corrected typo in Subject message

Applied to u-boot-mpc85xx master, awaiting upstream.

York