mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user