summaryrefslogtreecommitdiffstats
path: root/hw/rdma/vmw/pvrdma_main.c
diff options
context:
space:
mode:
authorRichard Henderson2022-04-26 16:54:22 +0200
committerRichard Henderson2022-04-26 16:54:22 +0200
commit80a172de5592b5c33aa6bc30da6f16c4ad1ae390 (patch)
tree451a54f38e808e462e696b69fc1c2f3d9a93c464 /hw/rdma/vmw/pvrdma_main.c
parentMerge tag 'pull-block-2022-04-25' of https://gitlab.com/hreitz/qemu into staging (diff)
parentdocs: Replace HomeBrew -> Homebrew (diff)
downloadqemu-80a172de5592b5c33aa6bc30da6f16c4ad1ae390.tar.gz
qemu-80a172de5592b5c33aa6bc30da6f16c4ad1ae390.tar.xz
qemu-80a172de5592b5c33aa6bc30da6f16c4ad1ae390.zip
Merge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging
Pull request trivial patches 20220426 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmJn6XkSHGxhdXJlbnRA # dml2aWVyLmV1AAoJEPMMOL0/L748TVwP/0zbxhynu1Eff4jsSHEMmk7UCkNvFNs+ # htebWHrLViUhHnRzJZJl2GNnw7X4p3A+IqnzBDqDBN3ikfnjbu+D33Sze25vVkpD # OVAJAhP7SA4jO2IdKrGgXoP7vGWrE4YGMnvhaJjEmGiKrm79oFSwIM6Cay/3IApm # 87ngcRQyb4lr66wJP+i6sr6jCU0Hq8nbmdeKYKNDAYKGqaDmuipbh+8Dt+FXzFWZ # N2l4CjtypQjF3U3s6FmL/8OWBJCQRLZkaNMH2Zv2ne9iWa1wBy4wuQ4qiFGz6b5L # g1uBHRIDsMhAggYc97mqJesz5gbAYwSVJ1abe7ZmZSzOCXMFsdXbRpPIh4ZSIjCW # OOwT+WkP5Yrlwyf1+K4YYx2CCsw713p0b8c9xlvP5xjF8gANfZeC1lH05ZHt3yoS # W+q2jHhPszigY0xjhM1xa6B21a+ZWhvfa3uZnDoGXOY3Xri/Itv9h0GVGxA/ccTs # rDtV1lK7oqWErxN6G6/rnAMo2vgJZ+CRwqubgE/vPhkOcDDtmwlDRNbqGfhGYPpx # n4Ytu5ygxv1+6DbkPx4RCVJ725fybGMUPlBi1iL9l7DYg5QiKlHXUQxkeJ8YllOf # unGAsfOhFZhJ7gMZlfQERQRZQGJjvTopl+zf49/HDT+NiRlxGAE4lTmHXG6vA7kX # po+0LJ+pbrX+ # =NHM0 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 26 Apr 2022 05:45:45 AM PDT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [undefined] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu: docs: Replace HomeBrew -> Homebrew docs: Replace Qemu -> QEMU target/mips: Remove stale TODO file vdpa: Add missing tracing to batch mapping functions hw/pvrdma: Some cosmetic fixes Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/rdma/vmw/pvrdma_main.c')
-rw-r--r--hw/rdma/vmw/pvrdma_main.c9
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;
}