]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fx2lafw/api.c
Don't check sr_channel_new() return value (always succeeds).
[libsigrok.git] / src / hardware / fx2lafw / api.c
index 64d3bfea574fc4a40129a2866acdd211f0b81565..7559f437b5da0282209bd9f8280f5768e7e03c37 100644 (file)
@@ -253,9 +253,8 @@ static GSList *scan(GSList *options)
                /* Fill in channellist according to this device's profile. */
                num_logic_channels = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
                for (j = 0; j < num_logic_channels; j++) {
-                       if (!(ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE,
-                                       channel_names[j])))
-                               return NULL;
+                       ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE,
+                                       channel_names[j]);
                        sdi->channels = g_slist_append(sdi->channels, ch);
                }