mirror of https://gitee.com/openkylin/libvirt.git
hyperv: Drop needless error label in hypervCreateEmbeddedParam()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Matt Coleman <matt@datto.com>
This commit is contained in:
parent
28065881f7
commit
7f238274bb
|
@ -325,7 +325,7 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
|
||||||
|
|
||||||
/* Get the typeinfo out of the class info list */
|
/* Get the typeinfo out of the class info list */
|
||||||
if (hypervGetWmiClassInfo(priv, info, &classInfo) < 0)
|
if (hypervGetWmiClassInfo(priv, info, &classInfo) < 0)
|
||||||
goto error;
|
return NULL;
|
||||||
|
|
||||||
typeinfo = classInfo->serializerInfo;
|
typeinfo = classInfo->serializerInfo;
|
||||||
|
|
||||||
|
@ -335,19 +335,16 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
|
||||||
|
|
||||||
table = virHashCreate(count, NULL);
|
table = virHashCreate(count, NULL);
|
||||||
if (table == NULL)
|
if (table == NULL)
|
||||||
goto error;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; typeinfo[i].name != NULL; i++) {
|
for (i = 0; typeinfo[i].name != NULL; i++) {
|
||||||
item = &typeinfo[i];
|
item = &typeinfo[i];
|
||||||
|
|
||||||
if (virHashAddEntry(table, item->name, NULL) < 0)
|
if (virHashAddEntry(table, item->name, NULL) < 0)
|
||||||
goto error;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_steal_pointer(&table);
|
return g_steal_pointer(&table);
|
||||||
|
|
||||||
error:
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue