Skip to content

Commit

Permalink
xen: remove redundant NULL check before unregister_and_remove_pcpu().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
  • Loading branch information
Steap authored and konradwilk committed Feb 13, 2013
1 parent 13d2b4d commit 4f8c852
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/xen/pcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4f8c852

Please sign in to comment.