FET database bug fixes.
This commit is contained in:
parent
a87ad8b834
commit
6d0d32c8a0
6
fet.c
6
fet.c
|
@ -501,10 +501,8 @@ static int do_identify(struct fet_device *dev, const char *force_id)
|
|||
|
||||
printf("Device: %s\n", r->name);
|
||||
|
||||
if (xfer(dev, 0x2b, r->msg2b_data, FET_DB_MSG2B_LEN, 0) < 0) {
|
||||
fprintf(stderr, "fet: message 0x2b failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (xfer(dev, 0x2b, r->msg2b_data, FET_DB_MSG2B_LEN, 0) < 0)
|
||||
fprintf(stderr, "fet: warning: message 0x2b failed\n");
|
||||
|
||||
if (xfer(dev, 0x29, r->msg29_data, FET_DB_MSG29_LEN,
|
||||
3, r->msg29_params[0], r->msg29_params[1],
|
||||
|
|
3
fet_db.c
3
fet_db.c
|
@ -350,7 +350,6 @@ static const struct fet_db_record fet_db[] = {
|
|||
0x00, 0x00
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const struct fet_db_record *fet_db_find_by_msg28(uint8_t *data, int len)
|
||||
|
@ -384,7 +383,7 @@ const struct fet_db_record *fet_db_find_by_msg28(uint8_t *data, int len)
|
|||
}
|
||||
}
|
||||
|
||||
if (best)
|
||||
if (best >= 0)
|
||||
return &fet_db[best];
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue