diff options
author | Yuval Shaia | 2022-04-03 11:58:37 +0200 |
---|---|---|
committer | Laurent Vivier | 2022-04-26 12:25:14 +0200 |
commit | 46c1ea01312b13b8aa4da286c9d868fe9b702758 (patch) | |
tree | 3a5b6d85025bd340c3a0504f210090f7ff1c819b /hw/rdma | |
parent | Merge tag 'pull-block-2022-04-25' of https://gitlab.com/hreitz/qemu into staging (diff) | |
download | qemu-46c1ea01312b13b8aa4da286c9d868fe9b702758.tar.gz qemu-46c1ea01312b13b8aa4da286c9d868fe9b702758.tar.xz qemu-46c1ea01312b13b8aa4da286c9d868fe9b702758.zip |
hw/pvrdma: Some cosmetic fixes
Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20220403095837.2378-1-yuval.shaia.ml@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/rdma')
-rw-r--r-- | hw/rdma/vmw/pvrdma_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 27a7622432..58db0b8e3b 100644 --- a/hw/rdma/vmw/pvrdma_main.c +++ b/hw/rdma/vmw/pvrdma_main.c @@ -159,13 +159,13 @@ static void free_dsr(PVRDMADev *dev) free_dev_ring(pci_dev, &dev->dsr_info.cq, dev->dsr_info.cq_ring_state); rdma_pci_dma_unmap(pci_dev, dev->dsr_info.req, - sizeof(union pvrdma_cmd_req)); + sizeof(union pvrdma_cmd_req)); rdma_pci_dma_unmap(pci_dev, dev->dsr_info.rsp, - sizeof(union pvrdma_cmd_resp)); + sizeof(union pvrdma_cmd_resp)); rdma_pci_dma_unmap(pci_dev, dev->dsr_info.dsr, - sizeof(struct pvrdma_device_shared_region)); + sizeof(struct pvrdma_device_shared_region)); dev->dsr_info.dsr = NULL; } @@ -249,7 +249,8 @@ static void init_dsr_dev_caps(PVRDMADev *dev) { struct pvrdma_device_shared_region *dsr; - if (dev->dsr_info.dsr == NULL) { + if (!dev->dsr_info.dsr) { + /* Buggy or malicious guest driver */ rdma_error_report("Can't initialized DSR"); return; } |