]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/uni-t-ut32x/api.c
Don't check sr_channel_new() return value (always succeeds).
[libsigrok.git] / src / hardware / uni-t-ut32x / api.c
index 8c04e64a842c6fe96f656d21f5fb46cab6316d9b..aa38cf5fb7bd04bb11be8c00b39bdc1d00ce4456 100644 (file)
@@ -87,11 +87,8 @@ static GSList *scan(GSList *options)
                        sdi->inst_type = SR_INST_USB;
                        sdi->conn = l->data;
                        for (i = 0; i < 3; i++) {
-                               if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE,
-                                               channels[i]))) {
-                                       sr_dbg("Channel malloc failed.");
-                                       return NULL;
-                               }
+                               ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE,
+                                               channels[i]);
                                sdi->channels = g_slist_append(sdi->channels, ch);
                        }
                        devc = g_malloc0(sizeof(struct dev_context));