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-hcu - Fix error return code in kmb_ocs_hcu_probe()

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 472b04444cd3 ("crypto: keembay - Add Keem Bay OCS HCU 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>

authored by

Wei Yongjun and committed by
Herbert Xu
662c1c56 4ab6093b

+3 -1
+3 -1
drivers/crypto/keembay/keembay-ocs-hcu-core.c
··· 1220 1220 1221 1221 /* Initialize crypto engine */ 1222 1222 hcu_dev->engine = crypto_engine_alloc_init(dev, 1); 1223 - if (!hcu_dev->engine) 1223 + if (!hcu_dev->engine) { 1224 + rc = -ENOMEM; 1224 1225 goto list_del; 1226 + } 1225 1227 1226 1228 rc = crypto_engine_start(hcu_dev->engine); 1227 1229 if (rc) {