]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
hyperv: Drop needless error label in hypervCreateEmbeddedParam()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 19 Oct 2020 09:56:11 +0000 (11:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Oct 2020 10:09:57 +0000 (12:09 +0200)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Matt Coleman <matt@datto.com>
src/hyperv/hyperv_wmi.c

index 2faa2f396fd9cc1f8033274e3748a3761d0337d7..489bb03a9b3ae04e97c137e4eadb381491f167c5 100644 (file)
@@ -325,7 +325,7 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
 
     /* Get the typeinfo out of the class info list */
     if (hypervGetWmiClassInfo(priv, info, &classInfo) < 0)
-        goto error;
+        return NULL;
 
     typeinfo = classInfo->serializerInfo;
 
@@ -335,19 +335,16 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
 
     table = virHashCreate(count, NULL);
     if (table == NULL)
-        goto error;
+        return NULL;
 
     for (i = 0; typeinfo[i].name != NULL; i++) {
         item = &typeinfo[i];
 
         if (virHashAddEntry(table, item->name, NULL) < 0)
-            goto error;
+            return NULL;
     }
 
     return g_steal_pointer(&table);
-
- error:
-    return NULL;
 }