[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 47/59] pvrdma_main.c: remove unneeded labels
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v1 47/59] pvrdma_main.c: remove unneeded labels |
Date: |
Mon, 6 Jan 2020 15:24:13 -0300 |
Label 'out' from init_dev_ring() and load_dsr() can be
replaced by 'return' with the adequate value.
CC: Yuval Shaia <address@hidden>
CC: Marcel Apfelbaum <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
hw/rdma/vmw/pvrdma_main.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index 6f0fc405c7..fcaf829e30 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -94,8 +94,7 @@ static int init_dev_ring(PvrdmaRing *ring, struct pvrdma_ring
**ring_state,
dir = rdma_pci_dma_map(pci_dev, dir_addr, TARGET_PAGE_SIZE);
if (!dir) {
rdma_error_report("Failed to map to page directory (ring %s)", name);
- rc = -ENOMEM;
- goto out;
+ return -ENOMEM;
}
tbl = rdma_pci_dma_map(pci_dev, dir[0], TARGET_PAGE_SIZE);
if (!tbl) {
@@ -134,7 +133,6 @@ out_free_tbl:
out_free_dir:
rdma_pci_dma_unmap(pci_dev, dir, TARGET_PAGE_SIZE);
-out:
return rc;
}
@@ -177,8 +175,7 @@ static int load_dsr(PVRDMADev *dev)
sizeof(struct pvrdma_device_shared_region));
if (!dev->dsr_info.dsr) {
rdma_error_report("Failed to map to DSR");
- rc = -ENOMEM;
- goto out;
+ return -ENOMEM;
}
/* Shortcuts */
@@ -221,7 +218,7 @@ static int load_dsr(PVRDMADev *dev)
goto out_free_rsp;
}
- goto out;
+ return rc;
out_free_rsp:
rdma_pci_dma_unmap(pci_dev, dsr_info->rsp, sizeof(union pvrdma_cmd_resp));
@@ -234,7 +231,6 @@ out_free_dsr:
sizeof(struct pvrdma_device_shared_region));
dsr_info->dsr = NULL;
-out:
return rc;
}
--
2.24.1
- [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi(), (continued)
- [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 44/59] 9p-local.c: remove unneeded label in local_unlinkat_common(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 47/59] pvrdma_main.c: remove unneeded labels,
Daniel Henrique Barboza <=
- [PATCH v1 48/59] pvrdma_dev_ring.c: remove unneeded label in pvrdma_ring_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 49/59] rdma/rdma_rm.c: remove unneeded label in rdma_rm_alloc_pd(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 51/59] virtio/vhost.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 52/59] net/vhost_net.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 53/59] net/net_tx_pkt.c: remove unneeded label in net_tx_pkt_get_gso_type(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 55/59] linux-user/flatload.c: remove unused 'out' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 56/59] linux-user/signal.c: remove unneeded label in do_sigaltstack(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style, Daniel Henrique Barboza, 2020/01/06