aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/lrw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c
index 9d52e580d10a..8ef664e3bcd9 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -91,8 +91,9 @@ struct sinfo {
91 91
92static inline void inc(be128 *iv) 92static inline void inc(be128 *iv)
93{ 93{
94 if (!(iv->b = cpu_to_be64(be64_to_cpu(iv->b) + 1))) 94 be64_add_cpu(&iv->b, 1);
95 iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); 95 if (!iv->b)
96 be64_add_cpu(&iv->a, 1);
96} 97}
97 98
98static inline void lrw_round(struct sinfo *s, void *dst, const void *src) 99static inline void lrw_round(struct sinfo *s, void *dst, const void *src)