From: Jiri Pirko <j...@mellanox.com> Until now, 0 is returned in this error case. Fix it ro return -ENOMEM.
Signed-off-by: Jiri Pirko <j...@mellanox.com> --- v1->v2: - new patch --- hw/net/rocker/rocker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index a1d921d..104c097 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; } } -- 2.4.3