diff --git a/crypto/algapi.c b/crypto/algapi.c
index 3e4524e6139bcf3b58e8f44a8de33a96e9333aee..d49d7091cecfdce027c40b4ebea4f2987ff45ef1 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -543,7 +543,7 @@ int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg,
 {
 	int err = -EINVAL;
 
-	if (frontend && (alg->cra_flags ^ frontend->type) & frontend->maskset)
+	if ((alg->cra_flags ^ frontend->type) & frontend->maskset)
 		goto out;
 
 	spawn->frontend = frontend;