1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

usbdev: Only match requested USB devices

Don't use a device that has the same vendor ID, but a different
than requested product ID.

Fixes broken dediprog detection with TOMU in use.

Change-Id: I08c1c363ce2d6603e46efecc61d3910e02314fca
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/32892
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2019-05-20 11:31:44 +02:00 committed by Nico Huber
parent dc5af547df
commit 620ceb0e8f

View File

@ -54,7 +54,7 @@ static struct libusb_device_handle *get_by_vid_pid_filter(struct libusb_context
continue; continue;
} }
if ((desc.idVendor != vid) && (desc.idProduct != pid)) if ((desc.idVendor != vid) || (desc.idProduct != pid))
continue; continue;
msg_pdbg("Found USB device %04"PRIx16":%04"PRIx16" at address %d-%d.\n", msg_pdbg("Found USB device %04"PRIx16":%04"PRIx16" at address %d-%d.\n",