pnv: Fix some error handling cpu realize()
In pnv_core_realize() we call two functions with an Error * parameter in succession, which will go badly if they both cause errors. In fact, a failure in either of them indicates a qemu internal error, so we can just use &error_abort in both cases. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
b1d40d6e09
commit
937c2146a6
@ -172,12 +172,9 @@ static void pnv_core_realize(DeviceState *dev, Error **errp)
|
||||
object_initialize(obj, size, typename);
|
||||
|
||||
snprintf(name, sizeof(name), "thread[%d]", i);
|
||||
object_property_add_child(OBJECT(pc), name, obj, &local_err);
|
||||
object_property_add_child(OBJECT(pc), name, obj, &error_abort);
|
||||
object_property_add_alias(obj, "core-pir", OBJECT(pc),
|
||||
"pir", &local_err);
|
||||
if (local_err) {
|
||||
goto err;
|
||||
}
|
||||
"pir", &error_abort);
|
||||
object_unref(obj);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user