From: Bert Vermeulen Date: Sun, 16 Sep 2012 19:27:06 +0000 (+0200) Subject: fluke-dmm: don't log anything if no conn params given X-Git-Tag: dsupstream~687 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bc41e012e6eda6277cbbeb5933c82c3d74a5ce69;p=libsigrok.git fluke-dmm: don't log anything if no conn params given --- diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index bba2f129..be1a1e02 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -139,14 +139,8 @@ static GSList *hw_scan(GSList *options) break; } } - if (!conn) { - sr_dbg("fluke-dmm: no serial port provided"); + if (!conn || !serialcomm) 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) { sr_err("fluke-dmm: unable to open %s: %s", conn, strerror(errno));