From: Cyril Roelandt Date: Tue, 12 Feb 2013 04:01:53 +0000 (+0100) Subject: xen: remove redundant NULL check before unregister_and_remove_pcpu(). X-Git-Tag: v3.8~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f8c85272c5e7ea1f2fe15d866835bc6f8fc996f;p=profile%2Fcommon%2Fkernel-common.git 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 Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c index 067fcfa..5a27a45 100644 --- a/drivers/xen/pcpu.c +++ b/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; }