Explorar o código

xen: remove redundant NULL check before unregister_and_remove_pcpu().

unregister_and_remove_pcpu on a NULL pointer is a no-op, so the NULL check in
sync_pcpu can be removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cyril Roelandt %!s(int64=13) %!d(string=hai) anos
pai
achega
4f8c85272c
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/xen/pcpu.c

+ 1 - 2
drivers/xen/pcpu.c

@@ -278,8 +278,7 @@ static int sync_pcpu(uint32_t cpu, uint32_t *max_cpu)
 	 * Only those at cpu present map has its sys interface.
 	 */
 	if (info->flags & XEN_PCPU_FLAGS_INVALID) {
-		if (pcpu)
-			unregister_and_remove_pcpu(pcpu);
+		unregister_and_remove_pcpu(pcpu);
 		return 0;
 	}