]> git.proxmox.com Git - mirror_qemu.git/blobdiff - backends/cryptodev.c
qom: Put name parameter before value / visitor parameter
[mirror_qemu.git] / backends / cryptodev.c
index a3841c4e419d1e0c6ace6bc9864b1fafae213c99..72b7077475ebef813850b4c13f12ed4043778a48 100644 (file)
@@ -157,8 +157,7 @@ cryptodev_backend_set_queues(Object *obj, Visitor *v, const char *name,
     Error *local_err = NULL;
     uint32_t value;
 
-    visit_type_uint32(v, name, &value, &local_err);
-    if (local_err) {
+    if (!visit_type_uint32(v, name, &value, &local_err)) {
         goto out;
     }
     if (!value) {
@@ -215,7 +214,7 @@ static void cryptodev_backend_instance_init(Object *obj)
                           cryptodev_backend_set_queues,
                           NULL, NULL);
     /* Initialize devices' queues property to 1 */
-    object_property_set_int(obj, 1, "queues", NULL);
+    object_property_set_int(obj, "queues", 1, NULL);
 }
 
 static void cryptodev_backend_finalize(Object *obj)