aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/tmp421.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/tmp421.c')
-rw-r--r--hw/misc/tmp421.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/misc/tmp421.c b/hw/misc/tmp421.c
index 74864cd93d..9473382bd5 100644
--- a/hw/misc/tmp421.c
+++ b/hw/misc/tmp421.c
@@ -147,8 +147,7 @@ static void tmp421_set_temperature(Object *obj, Visitor *v, const char *name,
int offset = ext_range * 64 * 256;
int tempid;
- 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;
}