Skip to content

Commit

Permalink
rocker: return -ENOMEM in case of some world alloc fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jpirko authored and jasowang committed Mar 8, 2016
1 parent 0ab9cd9 commit 39e0c4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/net/rocker/rocker.c
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 39e0c4f

Please sign in to comment.