serial-dmm: No error message upon 0 new bytes.
This commit is contained in:
parent
9647ce694b
commit
66a4357667
|
@ -80,7 +80,9 @@ static void handle_new_data(struct sr_dev_inst *sdi, int dmm, void *info)
|
|||
/* Try to get as much data as the buffer can hold. */
|
||||
len = DMM_BUFSIZE - devc->buflen;
|
||||
len = serial_read(serial, devc->buf + devc->buflen, len);
|
||||
if (len < 1) {
|
||||
if (len == 0)
|
||||
return; /* No new bytes, nothing to do. */
|
||||
if (len < 0) {
|
||||
sr_err("Serial port read error: %d.", len);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue