mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
libusb_open() sets the given device handle to NULL if it
fails, so there is no need to do it again after returning. Submitted by: Christoph Mallon MFC after: 3 days
This commit is contained in:
parent
494b6fec82
commit
dc93480306
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228235
@ -427,8 +427,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, uint16_t vendor_id,
|
||||
*/
|
||||
if (pdesc->idVendor == vendor_id &&
|
||||
pdesc->idProduct == product_id) {
|
||||
if (libusb_open(devs[j], &pdev) < 0)
|
||||
pdev = NULL;
|
||||
libusb_open(devs[j], &pdev);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user