diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-08-31 10:58:32 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-09-11 07:39:14 +0300 |
commit | 3ec25b43faa76e00ef2b42184e21c91c101939e6 (patch) | |
tree | 585a99f7352fcd47f291f1da3da20584d15ca3ab /drivers/crypto/caam | |
parent | 7dfd1e01b3dfc13431b1b25720cf2692a7e111ef (diff) | |
download | linux-3ec25b43faa76e00ef2b42184e21c91c101939e6.tar.xz |
crypto: caam - use traditional error check pattern
Use traditional error check pattern
ret = ...;
if (ret)
return ret;
...
instead of checking error code to be 0.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam')
-rw-r--r-- | drivers/crypto/caam/ctrl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 65de57f169d9..25785404a58e 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -333,11 +333,10 @@ static int instantiate_rng(struct device *ctrldev, int state_handle_mask, kfree(desc); - if (!ret) - ret = devm_add_action_or_reset(ctrldev, devm_deinstantiate_rng, - ctrldev); + if (ret) + return ret; - return ret; + return devm_add_action_or_reset(ctrldev, devm_deinstantiate_rng, ctrldev); } /* |