diff options
Diffstat (limited to 'hw/misc/tmp421.c')
-rw-r--r-- | hw/misc/tmp421.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/misc/tmp421.c b/hw/misc/tmp421.c index 74864cd93d..49abe2d246 100644 --- a/hw/misc/tmp421.c +++ b/hw/misc/tmp421.c @@ -141,15 +141,12 @@ static void tmp421_set_temperature(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { TMP421State *s = TMP421(obj); - Error *local_err = NULL; int64_t temp; bool ext_range = (s->config[0] & TMP421_CONFIG_RANGE); int offset = ext_range * 64 * 256; int tempid; - 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; } |