aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2016-08-23 00:48:11 -0400
committerBjorn Helgaas <bhelgaas@google.com>2016-09-06 13:21:57 -0400
commit665e2245eb46a217926d45031b83f1212a1bb344 (patch)
tree1583d7ccbdb26579ba7814c3d69893635459440e
parent617ceb62eaa1a180e8af1be9903d960c3a0b2ebc (diff)
PCI: hv: Handle vmbus_sendpacket() failure in hv_compose_msi_msg()
Handle vmbus_sendpacket() failure in hv_compose_msi_msg(). I happened to find this when reading the code. I didn't get a real issue however. Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: KY Srinivasan <kys@microsoft.com> CC: Jake Oshins <jakeo@microsoft.com> CC: Haiyang Zhang <haiyangz@microsoft.com> CC: Vitaly Kuznetsov <vkuznets@redhat.com>
-rw-r--r--drivers/pci/host/pci-hyperv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index 3034d48edbe1..e9307afa003d 100644
--- a/drivers/pci/host/pci-hyperv.c
+++ b/drivers/pci/host/pci-hyperv.c
@@ -895,8 +895,10 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
895 sizeof(*int_pkt), (unsigned long)&ctxt.pkt, 895 sizeof(*int_pkt), (unsigned long)&ctxt.pkt,
896 VM_PKT_DATA_INBAND, 896 VM_PKT_DATA_INBAND,
897 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); 897 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
898 if (!ret) 898 if (ret)
899 wait_for_completion(&comp.comp_pkt.host_event); 899 goto free_int_desc;
900
901 wait_for_completion(&comp.comp_pkt.host_event);
900 902
901 if (comp.comp_pkt.completion_status < 0) { 903 if (comp.comp_pkt.completion_status < 0) {
902 dev_err(&hbus->hdev->device, 904 dev_err(&hbus->hdev->device,