mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qdev: Avoid using prop->name unnecessarily
We already get the property name as argument to the property getter and setters, we don't need to use prop->name. This will make it easier to remove the Property.name field in the future. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20201211220529.2290218-20-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
e68c2cb75a
commit
991f0ac901
3 changed files with 10 additions and 10 deletions
|
@ -63,7 +63,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
|
|||
s = qemu_find_tpm_be(str);
|
||||
if (s == NULL) {
|
||||
error_setg(errp, "Property '%s.%s' can't find value '%s'",
|
||||
object_get_typename(obj), prop->name, str);
|
||||
object_get_typename(obj), name, str);
|
||||
} else if (tpm_backend_init(s, TPM_IF(obj), errp) == 0) {
|
||||
*be = s; /* weak reference, avoid cyclic ref */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue