crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe()
Subsystems (2)
PATCH 1/1 crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe()
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function.
Fixes c9f608c38009 ("crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/crypto/keembay/keembay-ocs-ecc.c | 1 + 1 file changed, 1 insertion(+)
drivers/crypto/keembay/keembay-ocs-ecc.c +1 -0
@@ -930,6 +930,7 @@ static int kmb_ocs_ecc_probe(struct platform_device *pdev) ecc_dev->engine =crypto_engine_alloc_init (dev,1 );if (!ecc_dev->engine) {dev_err (dev,"Could not allocate crypto engine\n" ); + rc = -ENOMEM ; goto list_del; }
Hi Wei,
Quoted 9 lines · Wei Yongjun
Fix to return negative error code
-ENOMEMfrom the error handling case instead of 0, as done elsewhere in this function.Fixes c9f608c38009 ("crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>---
drivers/crypto/keembay/keembay-ocs-ecc.c | 1 +1 file changed, 1 insertion(+)
Reviewed-by Daniele Alessandrelli <[email protected]>
Thanks for the fix!
Quoted 14 lines
drivers/crypto/keembay/keembay-ocs-ecc.c +1
-0@@ -930,6 +930,7 @@ static int kmb_ocs_ecc_probe(struct platform_device *pdev) ecc_dev->engine = crypto_engine_alloc_init(dev, 1); if (!ecc_dev->engine) { dev_err(dev, "Could not allocate crypto engine\n"); + rc = -ENOMEM; goto list_del; }
Herbert Xu
maintainerQuoted 9 lines · Wei Yongjun
Fix to return negative error code
-ENOMEMfrom the error handling case instead of 0, as done elsewhere in this function.Fixes c9f608c38009 ("crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>--- drivers/crypto/keembay/keembay-ocs-ecc.c | 1 + 1 file changed, 1 insertion(+)
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