From 39e0c4f47d263453cd10920d0c372b370ffaf990 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Thu, 25 Feb 2016 15:31:56 +0100 Subject: 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 Signed-off-by: Jason Wang --- hw/net/rocker/rocker.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/net') 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; } } -- cgit v1.2.3