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:
Jiri Pirko 2016-02-25 15:31:56 +01:00 committed by Jason Wang
parent 0ab9cd9a4b
commit 39e0c4f47d
1 changed files with 1 additions and 0 deletions

View File

@ -1301,6 +1301,7 @@ static int pci_rocker_init(PCIDevice *dev)
for (i = 0; i < ROCKER_WORLD_TYPE_MAX; i++) {
if (!r->worlds[i]) {
err = -ENOMEM;
goto err_world_alloc;
}
}