X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fsession_file.c;h=8b4f60b592dfcc893600aa80f816a914710765a1;hp=6433998a202ad3cb11e4aa163767a93e63ea3d9c;hb=c368e6f3d248a73d69cd0c2c4a7c88a92def55e3;hpb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4 diff --git a/src/session_file.c b/src/session_file.c index 6433998a..8b4f60b5 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -213,9 +213,8 @@ SR_API int sr_session_load(const char *filename, struct sr_session **session) g_variant_new_uint64(total_channels), sdi, NULL); for (p = 0; p < total_channels; p++) { snprintf(channelname, SR_MAX_CHANNELNAME_LEN, "%" PRIu64, p); - if (!(ch = sr_channel_new(p, SR_CHANNEL_LOGIC, TRUE, - channelname))) - return SR_ERR; + ch = sr_channel_new(p, SR_CHANNEL_LOGIC, TRUE, + channelname); sdi->channels = g_slist_append(sdi->channels, ch); } } else if (!strncmp(keys[j], "probe", 5)) {