git://developer.intra2net.com
/
libftdi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Abort if no EEPROM is found
[libftdi]
/
examples
/
eeprom.c
diff --git
a/examples/eeprom.c
b/examples/eeprom.c
index
8d74d2c
..
3b8d3a6
100644
(file)
--- a/
examples/eeprom.c
+++ b/
examples/eeprom.c
@@
-188,6
+188,12
@@
int main(int argc, char **argv)
ftdi_get_eeprom_value(ftdi, CHIP_SIZE, & value);
+ if (value <0)
+ {
+ fprintf(stderr, "No EEPROM found\n");
+ return -1;
+
+ }
fprintf(stderr, "Chip type %d ftdi_eeprom_size: %d\n", ftdi->type, value);
if (ftdi->type == TYPE_R)
size = 0xa0;