sdi = NULL;
devc = NULL;
- conn = serialcomm = NULL;
/* Process and check options. */
+ conn = NULL;
+ serialcomm = SERIALCOMM;
if (sr_serial_extract_options(options, &conn, &serialcomm) != SR_OK)
return NULL;
- if (!serialcomm)
- serialcomm = SERIALCOMM;
/* Init serial port. */
serial = sr_serial_dev_inst_new(conn, serialcomm);
goto exit_err;
/* Query and verify model string. */
- serial_flush(serial);
if (lps_cmd_reply(buf, serial, "MODEL") != SR_OK)
return NULL;