From: Bert Vermeulen Date: Sun, 16 Sep 2012 21:43:47 +0000 (+0200) Subject: agilent-dmm: don't log anything if no conn params given X-Git-Tag: dsupstream~693 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c2016fa0eb1d0eb1b9ebf8af4556f6d606614f61;p=libsigrok.git agilent-dmm: don't log anything if no conn params given --- diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 29e7d15f..da5cad6f 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -174,14 +174,8 @@ static GSList *hw_scan(GSList *options) break; } } - if (!conn) { - sr_dbg("no serial port provided"); + if (!conn || !serialcomm) return NULL; - } - if (!serialcomm) { - sr_dbg("no serial communication parameters provided"); - return NULL; - } if ((fd = serial_open(conn, O_RDWR|O_NONBLOCK)) == -1) { sr_err("agilent-dmm: unable to open %s: %s", conn, strerror(errno));