mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
cpu: Simplify ppc64ModelFromCPU()
This commit is contained in:
parent
4590f0678f
commit
c238d16af4
@ -163,17 +163,10 @@ ppc64ModelFromCPU(const virCPUDef *cpu,
|
||||
if (!(model = ppc64ModelFind(map, cpu->model))) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU model %s"), cpu->model);
|
||||
goto error;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(model = ppc64ModelCopy(model)))
|
||||
goto error;
|
||||
|
||||
return model;
|
||||
|
||||
error:
|
||||
ppc64ModelFree(model);
|
||||
return NULL;
|
||||
return ppc64ModelCopy(model);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user