[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH PULL 01/31] hw/pvrdma: Check the correct return valu
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH PULL 01/31] hw/pvrdma: Check the correct return value |
Date: |
Sat, 22 Dec 2018 11:50:06 +0200 |
From: Yuval Shaia <address@hidden>
Return value of 0 means ok, we want to free the memory only in case of
error.
Signed-off-by: Yuval Shaia <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Marcel Apfelbaum<address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
hw/rdma/vmw/pvrdma_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
index 4faeb21631..57d6f41ae6 100644
--- a/hw/rdma/vmw/pvrdma_cmd.c
+++ b/hw/rdma/vmw/pvrdma_cmd.c
@@ -232,7 +232,7 @@ static int create_mr(PVRDMADev *dev, union pvrdma_cmd_req
*req,
cmd->start, cmd->length, host_virt,
cmd->access_flags, &resp->mr_handle,
&resp->lkey, &resp->rkey);
- if (host_virt && !resp->hdr.err) {
+ if (resp->hdr.err && host_virt) {
munmap(host_virt, cmd->length);
}
--
2.17.1
- [Qemu-devel] [PATCH PULL 00/31] RDMA queue, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 01/31] hw/pvrdma: Check the correct return value,
Marcel Apfelbaum <=
- [Qemu-devel] [PATCH PULL 04/31] hw/rdma: Return qpn 1 if ibqp is NULL, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 05/31] hw/rdma: Abort send-op if fail to create addr handler, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 03/31] hw/rdma: Add ability to force notification without re-arm, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 08/31] hw/pvrdma: Make default pkey 0xFFFF, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 07/31] hw/pvrdma: Make function reset_device return void, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 02/31] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 09/31] hw/pvrdma: Set the correct opcode for recv completion, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 13/31] vmxnet3: Move some definitions to header file, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 14/31] hw/pvrdma: Make sure PCI function 0 is vmxnet3, Marcel Apfelbaum, 2018/12/22
- [Qemu-devel] [PATCH PULL 10/31] hw/pvrdma: Set the correct opcode for send completion, Marcel Apfelbaum, 2018/12/22