From: Wei Yongjun <weiyongjun1@huawei.com>
To: Hulk Robot <hulkci@huawei.com>,
Daniele Alessandrelli <daniele.alessandrelli@intel.com>,
Mike Healy <mikex.healy@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, <linux-crypto@vger.kernel.org>
Subject: [PATCH -next] crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe()
Date: Wed, 10 Feb 2021 07:45:27 +0000 [thread overview]
Message-ID: <20210210074527.867400-1-weiyongjun1@huawei.com> (raw)
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 885743324513 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/crypto/keembay/keembay-ocs-aes-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/keembay/keembay-ocs-aes-core.c b/drivers/crypto/keembay/keembay-ocs-aes-core.c
index b6b25d994af3..2ef312866338 100644
--- a/drivers/crypto/keembay/keembay-ocs-aes-core.c
+++ b/drivers/crypto/keembay/keembay-ocs-aes-core.c
@@ -1649,8 +1649,10 @@ static int kmb_ocs_aes_probe(struct platform_device *pdev)
/* Initialize crypto engine */
aes_dev->engine = crypto_engine_alloc_init(dev, true);
- if (!aes_dev->engine)
+ if (!aes_dev->engine) {
+ rc = -ENOMEM;
goto list_del;
+ }
rc = crypto_engine_start(aes_dev->engine);
if (rc) {
next reply other threads:[~2021-02-10 7:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 7:45 Wei Yongjun [this message]
2021-02-11 15:13 ` [PATCH -next] crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe() Alessandrelli, Daniele
2021-03-04 6:42 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210210074527.867400-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=daniele.alessandrelli@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=hulkci@huawei.com \
--cc=linux-crypto@vger.kernel.org \
--cc=mikex.healy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.