aboutsummaryrefslogtreecommitdiff
path: root/hw/remote/remote-obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/remote/remote-obj.c')
-rw-r--r--hw/remote/remote-obj.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/remote/remote-obj.c b/hw/remote/remote-obj.c
index 2f25f92..3402068 100644
--- a/hw/remote/remote-obj.c
+++ b/hw/remote/remote-obj.c
@@ -107,7 +107,11 @@ static void remote_object_machine_done(Notifier *notifier, void *data)
error_report_err(err);
return;
}
- qio_channel_set_blocking(ioc, false, NULL);
+ if (!qio_channel_set_blocking(ioc, false, &err)) {
+ error_report_err(err);
+ object_unref(OBJECT(ioc));
+ return;
+ }
o->dev = dev;
@@ -163,7 +167,7 @@ static void remote_object_finalize(Object *obj)
g_free(o->devid);
}
-static void remote_object_class_init(ObjectClass *klass, void *data)
+static void remote_object_class_init(ObjectClass *klass, const void *data)
{
RemoteObjectClass *k = REMOTE_OBJECT_CLASS(klass);
@@ -188,7 +192,7 @@ static const TypeInfo remote_object_info = {
.instance_finalize = remote_object_finalize,
.class_size = sizeof(RemoteObjectClass),
.class_init = remote_object_class_init,
- .interfaces = (InterfaceInfo[]) {
+ .interfaces = (const InterfaceInfo[]) {
{ TYPE_USER_CREATABLE },
{ }
}