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>
This commit is contained in:
Cyril Roelandt 2013-02-12 05:01:53 +01:00 committed by Konrad Rzeszutek Wilk
parent 13d2b4d11d
commit 4f8c85272c
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}