summary refs log tree commit diff stats
path: root/hw/misc/tmp105.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/tmp105.c')
-rw-r--r--hw/misc/tmp105.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c
index 58dbebca90..2ae0b899be 100644
--- a/hw/misc/tmp105.c
+++ b/hw/misc/tmp105.c
@@ -75,8 +75,7 @@ static void tmp105_set_temperature(Object *obj, Visitor *v, const char *name,
     Error *local_err = NULL;
     int64_t temp;
 
-    visit_type_int(v, name, &temp, &local_err);
-    if (local_err) {
+    if (!visit_type_int(v, name, &temp, &local_err)) {
         error_propagate(errp, local_err);
         return;
     }