Преглед на файлове

[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>
Jesper Juhl преди 19 години
родител
ревизия
2b191befe2
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      net/ipv6/ipcomp6.c

+ 2 - 2
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);