diff options
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/acompress.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c index be28cbfd22e3..b353615fe265 100644 --- a/crypto/acompress.c +++ b/crypto/acompress.c @@ -337,17 +337,13 @@ int crypto_register_acomps(struct acomp_alg *algs, int count) for (i = 0; i < count; i++) { ret = crypto_register_acomp(&algs[i]); - if (ret) - goto err; + if (ret) { + crypto_unregister_acomps(algs, i); + return ret; + } } return 0; - -err: - for (--i; i >= 0; --i) - crypto_unregister_acomp(&algs[i]); - - return ret; } EXPORT_SYMBOL_GPL(crypto_register_acomps); |
