]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/conrad-digi-35-cpu/api.c
Use g_malloc0() consistently, simplify error handling.
[libsigrok.git] / src / hardware / conrad-digi-35-cpu / api.c
index 7f061fbbfc82599e52730208a702187c7b510d9a..ed7378ee596e5a9f786102cd90e5e75c0c528a84 100644 (file)
@@ -83,8 +83,7 @@ static GSList *scan(GSList *options)
         * the device is there.
         */
 
-       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;