crypto: api - check for ERR pointers in crypto_destroy_tfm()
[sfrench/cifs-2.6.git] / crypto / api.c
index ed08cbd5b9d3f41e70509bd1c00d346cd5d55c86..c4eda56cff8917e08c2de3b0ada13df291c785ab 100644 (file)
@@ -562,7 +562,7 @@ void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
 {
        struct crypto_alg *alg;
 
-       if (unlikely(!mem))
+       if (IS_ERR_OR_NULL(mem))
                return;
 
        alg = tfm->__crt_alg;