From 991f0ac90151fe1bf51a1630938041a5c5745fb9 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 11 Dec 2020 17:05:16 -0500 Subject: 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 Reviewed-by: Stefan Berger Reviewed-by: Igor Mammedov Message-Id: <20201211220529.2290218-20-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- backends/tpm/tpm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends') diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index 3973105..a5d997e 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -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 */ } -- cgit v1.1