]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/agilent-dmm/api.c
Use g_malloc0() consistently, simplify error handling.
[libsigrok.git] / src / hardware / agilent-dmm / api.c
index eb723bfad045177137c43ccfe75ef069b6b662c5..374c206a8a6de90eef5f0099ce9e6424b8c5e929 100644 (file)
@@ -112,8 +112,7 @@ static GSList *scan(GSList *options)
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
-       if (!(serial = sr_serial_dev_inst_new(conn, serialcomm)))
-               return NULL;
+       serial = sr_serial_dev_inst_new(conn, serialcomm);
 
        if (serial_open(serial, SERIAL_RDWR) != SR_OK)
                return NULL;