Skip to contentSkip to conversation

crypto: caam - fix error return code in caam_qi_init()

PATCH In review Wei Yongjun 3 participants 3 messages Apr 11, 2017 – Apr 21, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: caam - fix error return code in caam_qi_init()

From: Wei Yongjun <[email protected]>

Fix to return error code -ENOMEM from the kmem_cache_create() error handling case instead of 0(err is 0 here), as done elsewhere in this function.

Fixes 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")
---
 drivers/crypto/caam/qi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/caam/qi.c +1 -1
index 45de8fd..1990ed4 100644
@@ -789,7 +789,7 @@ int caam_qi_init(struct platform_device *caam_pdev)
 		dev_err(qidev, "Can't allocate CAAM cache\n");
 		free_rsp_fqs();
 		platform_device_unregister(qi_pdev);
-		return err;
+		return -ENOMEM;
 	}
 
 	/* Done with the CGRs; restore the cpus allowed mask */
maintainer
#2 lore raw
In reply to Wei Yongjun
Quoted 8 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix to return error code -ENOMEM from the kmem_cache_create() error handling case instead of 0(err is 0 here), as done elsewhere in this function.

Fixes 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt