mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
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: 472b04444c ("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>
This commit is contained in:
parent
4ab6093ba4
commit
662c1c5618
|
|
@ -1220,8 +1220,10 @@ static int kmb_ocs_hcu_probe(struct platform_device *pdev)
|
|||
|
||||
/* Initialize crypto engine */
|
||||
hcu_dev->engine = crypto_engine_alloc_init(dev, 1);
|
||||
if (!hcu_dev->engine)
|
||||
if (!hcu_dev->engine) {
|
||||
rc = -ENOMEM;
|
||||
goto list_del;
|
||||
}
|
||||
|
||||
rc = crypto_engine_start(hcu_dev->engine);
|
||||
if (rc) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user