Skip to content

Commit

Permalink
Handle 'No firmware found' for WestBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
cozycactus committed Sep 19, 2023
1 parent c8f4743 commit 62464c7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/librx888.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,12 @@ int rx888_open(rx888_dev_t **out_dev, uint32_t index)
goto err;
}

if (dev_desc.idVendor == 0x04b4 && dev_desc.idProduct == 0x00f1) {
goto open;
} else if (dev_desc.idVendor == 0x04b4 && dev_desc.idProduct == 0x00f3) {
if (dev_desc.idVendor == 0x04b4 && dev_desc.idProduct == 0x00f3) {
fprintf(stderr, "No firmware found!\n");
r = -1;
goto err;
} else {
fprintf(stderr, "Unknown device\n");
r = -1;
goto err;
}
open:
r = libusb_open(device, &dev->dev_handle);
if (r < 0) {
libusb_free_device_list(list, 1);
Expand Down

0 comments on commit 62464c7

Please sign in to comment.