summaryrefslogtreecommitdiffstats
path: root/usbdev.c
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-05-20 11:31:44 +0200
committerDavid Hendricks <david.hendricks@gmail.com>2019-05-27 19:18:28 +0000
commit4ca575dc5a81587da5affecd2cd97b7c8b4596b3 (patch)
treef29d091284687337fb0757dbeb64cbe9ac24bb87 /usbdev.c
parent93db6e16895287b7ac3a8a8f7f4a4f176547b7ed (diff)
downloadflashrom-4ca575dc5a81587da5affecd2cd97b7c8b4596b3.tar.gz
flashrom-4ca575dc5a81587da5affecd2cd97b7c8b4596b3.tar.bz2
flashrom-4ca575dc5a81587da5affecd2cd97b7c8b4596b3.zip
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/+/32891 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'usbdev.c')
-rw-r--r--usbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usbdev.c b/usbdev.c
index d793b65d7..764ac046a 100644
--- a/usbdev.c
+++ b/usbdev.c
@@ -54,7 +54,7 @@ static struct libusb_device_handle *get_by_vid_pid_filter(struct libusb_context
continue;
}
- if ((desc.idVendor != vid) && (desc.idProduct != pid))
+ if ((desc.idVendor != vid) || (desc.idProduct != pid))
continue;
msg_pdbg("Found USB device %04"PRIx16":%04"PRIx16" at address %d-%d.\n",