diff options
Diffstat (limited to 'hw/misc/tmp105.c')
-rw-r--r-- | hw/misc/tmp105.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c index 58dbebca90..b47120492a 100644 --- a/hw/misc/tmp105.c +++ b/hw/misc/tmp105.c @@ -72,12 +72,9 @@ static void tmp105_set_temperature(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { TMP105State *s = TMP105(obj); - Error *local_err = NULL; int64_t temp; - visit_type_int(v, name, &temp, &local_err); - if (local_err) { - error_propagate(errp, local_err); + if (!visit_type_int(v, name, &temp, errp)) { return; } if (temp >= 128000 || temp < -128000) { |