mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Use error_fatal to simplify obvious fatal errors (again)
Done with the Coccinelle semantic patch from commit 007b065
, plus
manual clean up of dead variables.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1452783732-6581-1-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e4a096b1cd
commit
07d04a0219
5 changed files with 5 additions and 30 deletions
|
@ -30,18 +30,13 @@
|
|||
static void netduino2_init(MachineState *machine)
|
||||
{
|
||||
DeviceState *dev;
|
||||
Error *err = NULL;
|
||||
|
||||
dev = qdev_create(NULL, TYPE_STM32F205_SOC);
|
||||
if (machine->kernel_filename) {
|
||||
qdev_prop_set_string(dev, "kernel-filename", machine->kernel_filename);
|
||||
}
|
||||
qdev_prop_set_string(dev, "cpu-model", "cortex-m3");
|
||||
object_property_set_bool(OBJECT(dev), true, "realized", &err);
|
||||
if (err != NULL) {
|
||||
error_report_err(err);
|
||||
exit(1);
|
||||
}
|
||||
object_property_set_bool(OBJECT(dev), true, "realized", &error_fatal);
|
||||
}
|
||||
|
||||
static void netduino2_machine_init(MachineClass *mc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue