From: Jesper Juhl <jesper.juhl@gmail.com>
Date: Tue, 21 Mar 2006 01:46:29 +0000 (-0800)
Subject: [IPCOMP6]: don't check vfree() argument for NULL.
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b191befe2c47c2f6e96b836a1f6054c9cbc4a0b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git

[IPCOMP6]: don't check vfree() argument for NULL.

vfree does it's own NULL checking, so checking a pointer before
handing it to vfree is pointless.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index d511a884dad..6107592fbd8 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -286,8 +286,8 @@ static void ipcomp6_free_scratches(void)
 
 	for_each_cpu(i) {
 		void *scratch = *per_cpu_ptr(scratches, i);
-		if (scratch)
-			vfree(scratch);
+
+		vfree(scratch);
 	}
 
 	free_percpu(scratches);