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))) {
|
if (!(model = ppc64ModelFind(map, cpu->model))) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Unknown CPU model %s"), cpu->model);
|
_("Unknown CPU model %s"), cpu->model);
|
||||||
goto error;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(model = ppc64ModelCopy(model)))
|
return ppc64ModelCopy(model);
|
||||||
goto error;
|
|
||||||
|
|
||||||
return model;
|
|
||||||
|
|
||||||
error:
|
|
||||||
ppc64ModelFree(model);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user