aboutsummaryrefslogtreecommitdiff
path: root/hw/net/rocker
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2016-02-25 15:31:56 +0100
committerJason Wang <jasowang@redhat.com>2016-03-08 15:34:18 +0800
commit39e0c4f47d263453cd10920d0c372b370ffaf990 (patch)
tree76f78110d9fccec67bb816b1962a73d5da7110fa /hw/net/rocker
parent0ab9cd9a4b3f3c464d63fd30e5f958bfdf690af3 (diff)
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>
Diffstat (limited to 'hw/net/rocker')
-rw-r--r--hw/net/rocker/rocker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index a1d921dc1c..104c097852 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -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;
}
}