fluke-dmm: don't log anything if no conn params given

This commit is contained in:
Bert Vermeulen 2012-09-16 21:27:06 +02:00
parent fb480d578e
commit bc41e012e6
1 changed files with 1 additions and 7 deletions

View File

@ -139,14 +139,8 @@ static GSList *hw_scan(GSList *options)
break; break;
} }
} }
if (!conn) { if (!conn || !serialcomm)
sr_dbg("fluke-dmm: no serial port provided");
return NULL; return NULL;
}
if (!serialcomm) {
sr_dbg("fluke-dmm: no serial communication parameters provided");
return NULL;
}
if ((fd = serial_open(conn, O_RDWR|O_NONBLOCK)) == -1) { if ((fd = serial_open(conn, O_RDWR|O_NONBLOCK)) == -1) {
sr_err("fluke-dmm: unable to open %s: %s", conn, strerror(errno)); sr_err("fluke-dmm: unable to open %s: %s", conn, strerror(errno));