diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-11-01 14:02:33 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-11-20 15:02:08 +1100 |
commit | 94ad2d19a97efdb603a21fcad0625f466f1cdd0f (patch) | |
tree | 07c1b3ae0404cfc1d4cd13a3e020e1a7c424dabf /drivers/crypto/keembay | |
parent | efd21e10fc3bf4c6da122470a5ae89ec4ed8d180 (diff) |
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 <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/keembay')
-rw-r--r-- | drivers/crypto/keembay/keembay-ocs-ecc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/keembay/keembay-ocs-ecc.c b/drivers/crypto/keembay/keembay-ocs-ecc.c index 679e6ae295e0..5d0785d3f1b5 100644 --- a/drivers/crypto/keembay/keembay-ocs-ecc.c +++ b/drivers/crypto/keembay/keembay-ocs-ecc.c @@ -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; } |