summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-08-31 10:58:32 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-11 14:39:14 +1000
commit3ec25b43faa76e00ef2b42184e21c91c101939e6 (patch)
tree585a99f7352fcd47f291f1da3da20584d15ca3ab
parent7dfd1e01b3dfc13431b1b25720cf2692a7e111ef (diff)
downloadlinux-3ec25b43faa76e00ef2b42184e21c91c101939e6.tar.bz2
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>
-rw-r--r--drivers/crypto/caam/ctrl.c7
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);
}
/*