diff options
author | Jiri Pirko <jiri@mellanox.com> | 2016-02-25 15:31:56 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:49:13 -0600 |
commit | 256c6a619717c04866e378bd9245ed379f27c2f0 (patch) | |
tree | ea1d007b3b4ccc69158c1a0e4dea74dcc3f12634 | |
parent | 448b43185da0c6a9897124ed5de7208ef0ce2c68 (diff) | |
download | hqemu-256c6a619717c04866e378bd9245ed379f27c2f0.zip hqemu-256c6a619717c04866e378bd9245ed379f27c2f0.tar.gz |
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>
-rw-r--r-- | hw/net/rocker/rocker.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } } |