mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
crypto: omap-des - fix error return code in omap_des_probe()
Fix to return error code -ENOMEM from the crypto_engine_alloc_init()
error handling case instead of 0, as done elsewhere in this function.
Fixes: f1b77aaca8 ("crypto: omap-des - Integrate with the crypto
engine framework")
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
36e09e1f87
commit
59af156625
1 changed files with 3 additions and 1 deletions
|
|
@ -1081,8 +1081,10 @@ static int omap_des_probe(struct platform_device *pdev)
|
|||
|
||||
/* Initialize des crypto engine */
|
||||
dd->engine = crypto_engine_alloc_init(dev, 1);
|
||||
if (!dd->engine)
|
||||
if (!dd->engine) {
|
||||
err = -ENOMEM;
|
||||
goto err_engine;
|
||||
}
|
||||
|
||||
dd->engine->prepare_cipher_request = omap_des_prepare_req;
|
||||
dd->engine->cipher_one_request = omap_des_crypt_req;
|
||||
|
|
|
|||
Loading…
Reference in a new issue