aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/pca9552.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/pca9552.c')
-rw-r--r--hw/misc/pca9552.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/misc/pca9552.c b/hw/misc/pca9552.c
index 68b574d084..d2b99fc706 100644
--- a/hw/misc/pca9552.c
+++ b/hw/misc/pca9552.c
@@ -296,8 +296,7 @@ static void pca955x_set_led(Object *obj, Visitor *v, const char *name,
uint8_t state;
char *state_str;
- visit_type_str(v, name, &state_str, &local_err);
- if (local_err) {
+ if (!visit_type_str(v, name, &state_str, &local_err)) {
error_propagate(errp, local_err);
return;
}