Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe()

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>
Reviewed-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Wei Yongjun and committed by
Herbert Xu
2eee428d 662c1c56

+3 -1
+3 -1
drivers/crypto/keembay/keembay-ocs-aes-core.c
··· 1649 1649 1650 1650 /* Initialize crypto engine */ 1651 1651 aes_dev->engine = crypto_engine_alloc_init(dev, true); 1652 - if (!aes_dev->engine) 1652 + if (!aes_dev->engine) { 1653 + rc = -ENOMEM; 1653 1654 goto list_del; 1655 + } 1654 1656 1655 1657 rc = crypto_engine_start(aes_dev->engine); 1656 1658 if (rc) {