if (!vid_pids)
continue;
while (vid_pids->vid) {
- if (vid_pids->vid == vid && vid_pids->pid == pid) {
+ if (vid_pids->vid == vid && vid_pids->pid == pid)
return desc->chipname;
- }
vid_pids++;
}
}
* Immediately satisfy the caller's request from the RX buffer
* if the requested amount of data is available already.
*/
- if (sr_ser_has_queued_data(serial) >= count) {
- rc = sr_ser_unqueue_rx_data(serial, buf, count);
- return rc;
- }
+ if (sr_ser_has_queued_data(serial) >= count)
+ return sr_ser_unqueue_rx_data(serial, buf, count);
/*
* When a timeout was specified, then determine the deadline
if (got > count)
got = count;
sr_dbg("DBG: %s() passing %d bytes.", __func__, got);
- rc = sr_ser_unqueue_rx_data(serial, buf, count);
- return rc;
+ return sr_ser_unqueue_rx_data(serial, buf, count);
}
static struct ser_lib_functions serlib_hid = {