synaptics: Fix missing reference to interrupt transfer

When resubmitting the interrupt transfer we need to add a new reference
as the submit function will steal it again.
This commit is contained in:
Benjamin Berg 2020-10-19 16:59:28 +02:00
parent 59824d2122
commit 90a1abf2f8

View file

@ -199,9 +199,17 @@ cmd_interrupt_cb (FpiUsbTransfer *transfer,
} }
if (transfer->buffer[0] & USB_ASYNC_MESSAGE_PENDING) if (transfer->buffer[0] & USB_ASYNC_MESSAGE_PENDING)
{
fpi_ssm_next_state (transfer->ssm); fpi_ssm_next_state (transfer->ssm);
}
else else
fpi_usb_transfer_submit (transfer, 1000, NULL, cmd_interrupt_cb, NULL); {
fpi_usb_transfer_submit (fpi_usb_transfer_ref (transfer),
1000,
NULL,
cmd_interrupt_cb,
NULL);
}
} }
static void static void