mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
qom: use object_new_with_type in object_new_with_propv
Function object_new_with_propv already get the Type of the object, so we could leverage object_new_with_type here. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190311083234.20841-1-richardw.yang@linux.intel.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
e8338fdbbb
commit
66e1155a69
1 changed files with 1 additions and 1 deletions
|
@ -679,7 +679,7 @@ Object *object_new_with_propv(const char *typename,
|
|||
error_setg(errp, "object type '%s' is abstract", typename);
|
||||
return NULL;
|
||||
}
|
||||
obj = object_new(typename);
|
||||
obj = object_new_with_type(klass->type);
|
||||
|
||||
if (object_set_propv(obj, &local_err, vargs) < 0) {
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue