]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/norma-dmm/api.c
Use g_malloc0() consistently, simplify error handling.
[libsigrok.git] / src / hardware / norma-dmm / api.c
index 34d7de145e58af9a7804c993b819fb8b3f13e583..83e11351060bff50bce99157b9a582e75f1359a2 100644 (file)
@@ -112,8 +112,7 @@ static GSList *do_scan(struct sr_dev_driver* drv, 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;