diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-02-11 23:01:53 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-02-13 15:40:33 -0500 |
commit | 4f8c85272c5e7ea1f2fe15d866835bc6f8fc996f (patch) | |
tree | 14271e11a7ca318564d96ac1f7bd235b3b5cda1e | |
parent | 13d2b4d11d69a92574a55bfd985cfb0ca77aebdc (diff) |
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>
-rw-r--r-- | drivers/xen/pcpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c index 067fcfa1723e..5a27a4599a4a 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) | |||
278 | * Only those at cpu present map has its sys interface. | 278 | * Only those at cpu present map has its sys interface. |
279 | */ | 279 | */ |
280 | if (info->flags & XEN_PCPU_FLAGS_INVALID) { | 280 | if (info->flags & XEN_PCPU_FLAGS_INVALID) { |
281 | if (pcpu) | 281 | unregister_and_remove_pcpu(pcpu); |
282 | unregister_and_remove_pcpu(pcpu); | ||
283 | return 0; | 282 | return 0; |
284 | } | 283 | } |
285 | 284 | ||