diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-05-07 13:47:25 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-05-07 13:47:26 +0100 |
| commit | 7f8fea8b3d31ca396eb3c88bf97b543a86773774 (patch) | |
| tree | da0ba9bdab83d3e2050d5bdfb78d86ca90c228a9 /backends/tpm.c | |
| parent | 951916d02c59cd0eddd57c3d66f87f921931e394 (diff) | |
| parent | 848696bf353750899832c51005f1bd3540da5c29 (diff) | |
| download | focaccia-qemu-7f8fea8b3d31ca396eb3c88bf97b543a86773774.tar.gz focaccia-qemu-7f8fea8b3d31ca396eb3c88bf97b543a86773774.zip | |
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM/QTest infrastructure fixes and device conversions * -device / device_add assertion fix * QEMUMachine conversion to MachineClass * Device error handling improvements * QTest cleanups and test cases for some more PCI devices * PortIO memory leak fixes # gpg: Signature made Mon 05 May 2014 19:59:16 BST using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-peter: PortioList: Store PortioList in device state tests: Add EHCI qtest tests: Add ioh3420 qtest tests: Add intel-hda qtests tests: Add es1370 qtest tests: Add ac97 qtest qtest: Be paranoid about accept() addrlen argument qtest: Add error reporting to socket_accept() qtest: Assure that init_socket()'s listen() does not fail MAINTAINERS: Document QOM arm: Clean up fragile use of error_is_set() in realize() methods qom: Clean up fragile use of error_is_set() in set() methods hw: Consistently name Error ** objects errp, and not err hw: Consistently name Error * objects err, and not errp machine: Remove QEMUMachine indirection from MachineClass machine: Replace QEMUMachine by MachineClass in accelerator configuration vl.c: Replace QEMUMachine with MachineClass in QEMUMachineInitArgs machine: Copy QEMUMachine's fields to MachineClass machine: Remove obsoleted field from QEMUMachine qdev: Fix crash by validating the object type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'backends/tpm.c')
| -rw-r--r-- | backends/tpm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backends/tpm.c b/backends/tpm.c index b73580134c..01860c4acb 100644 --- a/backends/tpm.c +++ b/backends/tpm.c @@ -112,6 +112,7 @@ static void tpm_backend_prop_set_opened(Object *obj, bool value, Error **errp) { TPMBackend *s = TPM_BACKEND(obj); TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s); + Error *local_err = NULL; if (value == s->opened) { return; @@ -123,12 +124,14 @@ static void tpm_backend_prop_set_opened(Object *obj, bool value, Error **errp) } if (k->opened) { - k->opened(s, errp); + k->opened(s, &local_err); + if (local_err) { + error_propagate(errp, local_err); + return; + } } - if (!error_is_set(errp)) { - s->opened = value; - } + s->opened = true; } static void tpm_backend_instance_init(Object *obj) |