]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/link-mso19/api.c
beaglelogic: Add SR_CONF_CAPTURE_RATIO support.
[libsigrok.git] / src / hardware / link-mso19 / api.c
index 5112fe285d2d0103b41e9c1b5f4f4421ce1c63f4..451cc9347a163d94e8f13196f866aee77cf2a610 100644 (file)
@@ -195,10 +195,7 @@ static GSList *scan(GSList *options)
                        devc->protocol_trigger.mask[i] = 0xff;
                }
 
-               if (!(devc->serial = sr_serial_dev_inst_new(conn, serialcomm))) {
-                       g_free(devc);
-                       return devices;
-               }
+               devc->serial = sr_serial_dev_inst_new(conn, serialcomm);
 
                struct sr_dev_inst *sdi = g_malloc0(sizeof(struct sr_dev_inst));
                sdi->status = SR_ST_INACTIVE;
@@ -220,9 +217,8 @@ static GSList *scan(GSList *options)
                for (i = 0; i < NUM_CHANNELS; i++) {
                        struct sr_channel *ch;
                        chtype = (i == 0) ? SR_CHANNEL_ANALOG : SR_CHANNEL_LOGIC;
-                       if (!(ch = sr_channel_new(i, chtype, TRUE,
-                                                  mso19_channel_names[i])))
-                               return 0;
+                       ch = sr_channel_new(i, chtype, TRUE,
+                                           mso19_channel_names[i]);
                        sdi->channels = g_slist_append(sdi->channels, ch);
                }