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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c
index 63aa3d6277..636ee97b16 100644
--- a/hw/misc/tmp105.c
+++ b/hw/misc/tmp105.c
@@ -68,10 +68,12 @@ static void tmp105_set_temperature(Object *obj, Visitor *v, void *opaque,
                                    const char *name, Error **errp)
 {
     TMP105State *s = TMP105(obj);
+    Error *local_err = NULL;
     int64_t temp;
 
-    visit_type_int(v, &temp, name, errp);
-    if (error_is_set(errp)) {
+    visit_type_int(v, &temp, name, &local_err);
+    if (local_err) {
+        error_propagate(errp, local_err);
         return;
     }
     if (temp >= 128000 || temp < -128000) {