drivers: Simplify libusb_alloc_transfer(0) calls

By using our new, never-failing, USB allocation wrapper. As it can never
fail, we can also remove all the error paths for the allocations
failing.
This commit is contained in:
Bastien Nocera
2018-09-19 17:06:17 +02:00
parent bdba9990fb
commit 10ae8ffb55
18 changed files with 74 additions and 325 deletions

View File

@@ -640,13 +640,10 @@ static int async_tx(struct fp_img_dev *idev, unsigned int ep, void *cb,
void *cb_arg)
{
struct etes603_dev *dev = FP_INSTANCE_DATA(FP_DEV(idev));
struct libusb_transfer *transfer = libusb_alloc_transfer(0);
struct libusb_transfer *transfer = fpi_usb_alloc();
unsigned char *buffer;
int length;
if (!transfer)
return -ENOMEM;
if (ep == EP_OUT) {
buffer = (unsigned char *)dev->req;
length = dev->req_len;