[PATCH] crypto: lzo: use kvfree() helper

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

 



From: Eric Dumazet <edumazet@xxxxxxxxxx>

kvfree() helper is now available, use it instead of open code it.

Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
---
 crypto/lzo.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/crypto/lzo.c b/crypto/lzo.c
index 252e791d..a8ff2f7 100644
--- a/crypto/lzo.c
+++ b/crypto/lzo.c
@@ -45,10 +45,7 @@ static void lzo_exit(struct crypto_tfm *tfm)
 {
 	struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
 
-	if (is_vmalloc_addr(ctx->lzo_comp_mem))
-		vfree(ctx->lzo_comp_mem);
-	else
-		kfree(ctx->lzo_comp_mem);
+	kvfree(ctx->lzo_comp_mem);
 }
 
 static int lzo_compress(struct crypto_tfm *tfm, const u8 *src,


--
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