diff options
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/tmp105.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c index 63aa3d6..636ee97 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) { |