Sfoglia il codice sorgente

[CRYPTO] tcrypt: Fix error checking for comp allocation

This patch fixes loading the tcrypt module while deflate isn't available
at all (isn't build).

Signed-off-by: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Sebastian Siewior 18 anni fa
parent
commit
7bc301e97b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      crypto/tcrypt.c

+ 1 - 1
crypto/tcrypt.c

@@ -768,7 +768,7 @@ static void test_deflate(void)
 	tv = (void *)tvmem;
 
 	tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
-	if (tfm == NULL) {
+	if (IS_ERR(tfm)) {
 		printk("failed to load transform for deflate\n");
 		return;
 	}