mirror of https://gitee.com/openkylin/qemu.git
rocker: return -ENOMEM in case of some world alloc fails
Until now, 0 is returned in this error case. Fix it ro return -ENOMEM. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
0ab9cd9a4b
commit
39e0c4f47d
|
@ -1301,6 +1301,7 @@ static int pci_rocker_init(PCIDevice *dev)
|
||||||
|
|
||||||
for (i = 0; i < ROCKER_WORLD_TYPE_MAX; i++) {
|
for (i = 0; i < ROCKER_WORLD_TYPE_MAX; i++) {
|
||||||
if (!r->worlds[i]) {
|
if (!r->worlds[i]) {
|
||||||
|
err = -ENOMEM;
|
||||||
goto err_world_alloc;
|
goto err_world_alloc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue