Skip to content

Commit 665e224

Browse files
dcuibjorn-helgaas
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: KY Srinivasan <[email protected]> CC: Jake Oshins <[email protected]> CC: Haiyang Zhang <[email protected]> CC: Vitaly Kuznetsov <[email protected]>
1 parent 617ceb6 commit 665e224

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pci/host/pci-hyperv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,10 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
895895
sizeof(*int_pkt), (unsigned long)&ctxt.pkt,
896896
VM_PKT_DATA_INBAND,
897897
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
898-
if (!ret)
899-
wait_for_completion(&comp.comp_pkt.host_event);
898+
if (ret)
899+
goto free_int_desc;
900+
901+
wait_for_completion(&comp.comp_pkt.host_event);
900902

901903
if (comp.comp_pkt.completion_status < 0) {
902904
dev_err(&hbus->hdev->device,

0 commit comments

Comments
 (0)