mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
hw/arm: Drop useless object_property_set_link() error handling
object_property_set_link() fails when the property doesn't exist, is not settable, or its .check() method fails. These are all programming errors here, so passing it &error_abort is appropriate. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: "Cédric Le Goater" <clg@kaod.org> Cc: Andrew Jeffery <andrew@aj.id.au> Cc: Joel Stanley <joel@jms.id.au> Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20200630090351.1247703-17-armbru@redhat.com>
This commit is contained in:
parent
2726dc51e0
commit
c24d97168a
5 changed files with 24 additions and 76 deletions
|
@ -341,11 +341,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
|
|||
}
|
||||
|
||||
/* I2C */
|
||||
object_property_set_link(OBJECT(&s->i2c), OBJECT(s->dram_mr), "dram", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
object_property_set_link(OBJECT(&s->i2c), OBJECT(s->dram_mr), "dram",
|
||||
&error_abort);
|
||||
sysbus_realize(SYS_BUS_DEVICE(&s->i2c), &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
|
@ -363,11 +360,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
|
|||
}
|
||||
|
||||
/* FMC, The number of CS is set at the board level */
|
||||
object_property_set_link(OBJECT(&s->fmc), OBJECT(s->dram_mr), "dram", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
object_property_set_link(OBJECT(&s->fmc), OBJECT(s->dram_mr), "dram",
|
||||
&error_abort);
|
||||
object_property_set_int(OBJECT(&s->fmc), sc->memmap[ASPEED_SDRAM],
|
||||
"sdram-base", &err);
|
||||
if (err) {
|
||||
|
@ -388,11 +382,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
|
|||
/* SPI */
|
||||
for (i = 0; i < sc->spis_num; i++) {
|
||||
object_property_set_link(OBJECT(&s->spi[i]), OBJECT(s->dram_mr),
|
||||
"dram", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
"dram", &error_abort);
|
||||
object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", &err);
|
||||
sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &err);
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue