}
/* Init device instance, etc. */
- sdi = sr_dev_inst_new();
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->status = SR_ST_INACTIVE;
sdi->vendor = g_strdup("Manson");
sdi->model = g_strdup(models[model_id].name);
sdi->conn = serial;
sdi->driver = di;
- if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "CH1"))) {
- sr_err("Failed to create channel.");
- goto exit_err;
- }
+ ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "CH1");
sdi->channels = g_slist_append(sdi->channels, ch);
devc = g_malloc0(sizeof(struct dev_context));