summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/mxc-scc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/mxc-scc.c')
-rw-r--r--drivers/crypto/mxc-scc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/mxc-scc.c b/drivers/crypto/mxc-scc.c
index 9b348a78dd23..ff383ef83871 100644
--- a/drivers/crypto/mxc-scc.c
+++ b/drivers/crypto/mxc-scc.c
@@ -616,7 +616,7 @@ static struct mxc_scc_crypto_tmpl *scc_crypto_algs[] = {
static int mxc_scc_crypto_register(struct mxc_scc *scc)
{
- unsigned int i;
+ int i;
int err = 0;
for (i = 0; i < ARRAY_SIZE(scc_crypto_algs); i++) {
@@ -629,7 +629,7 @@ static int mxc_scc_crypto_register(struct mxc_scc *scc)
return 0;
err_out:
- for (; i > 0; i--)
+ while (--i >= 0)
crypto_unregister_alg(&scc_crypto_algs[i]->alg);
return err;
OpenPOWER on IntegriCloud