[PATCH cryptodev] crypto: memneq: fix for archs without efficient unaligned access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit fe8c8a126806 introduced a possible build error for archs
that do not have CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS set. :/
Fix this up by bringing else braces outside of the ifdef.

Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Fixes: fe8c8a126806 ("crypto: more robust crypto_memneq")
Cc: Cesar Eduardo Barros <cesarb@xxxxxxxxxxxxx>
Signed-off-by: Daniel Borkmann <dborkman@xxxxxxxxxx>
---
 Sending stand-alone fix as original patch is already applied.

 crypto/memneq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/memneq.c b/crypto/memneq.c
index 570f6f3..afed1bd 100644
--- a/crypto/memneq.c
+++ b/crypto/memneq.c
@@ -108,8 +108,9 @@ static inline unsigned long __crypto_memneq_16(const void *a, const void *b)
 		OPTIMIZER_HIDE_VAR(neq);
 		neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12);
 		OPTIMIZER_HIDE_VAR(neq);
-	} else {
+	} else
 #endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
+	{
 		neq |= *(unsigned char *)(a)    ^ *(unsigned char *)(b);
 		OPTIMIZER_HIDE_VAR(neq);
 		neq |= *(unsigned char *)(a+1)  ^ *(unsigned char *)(b+1);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux