X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fchronovu-la%2Fapi.c;h=c9d7ec11cbd1aca58d38544ad67adcfd91831f54;hb=c368e6f3d248a73d69cd0c2c4a7c88a92def55e3;hp=d9e3cc3914edad598d79d45847afa66d17f2abce;hpb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;p=libsigrok.git diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index d9e3cc39..c9d7ec11 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -128,11 +128,8 @@ static int add_device(int idx, int model, GSList **devices) sdi->priv = devc; for (i = 0; i < devc->prof->num_channels; i++) { - if (!(ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, - cv_channel_names[i]))) { - ret = SR_ERR; - goto err_free_dev_inst; - } + ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, + cv_channel_names[i]); sdi->channels = g_slist_append(sdi->channels, ch); } @@ -142,9 +139,6 @@ static int add_device(int idx, int model, GSList **devices) if (ret == SR_OK) return SR_OK; -err_free_dev_inst: - sr_dev_inst_free(sdi); - g_free(devc->final_buf); err_free_devc: g_free(devc);