if (check_manufacturer(hw_info->manufacturer) != SR_OK)
goto fail;
- sdi = sr_dev_inst_new();
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->status = SR_ST_ACTIVE;
sdi->vendor = g_strdup(hw_info->manufacturer);
sdi->model = g_strdup(hw_info->model);
sr_scpi_hw_info_free(hw_info);
hw_info = NULL;
- if (!(devc = g_try_malloc0(sizeof(struct dev_context))))
- goto fail;
+ devc = g_malloc0(sizeof(struct dev_context));
sdi->priv = devc;
state = devc->model_state;
switch (key) {
- case SR_CONF_NUM_TIMEBASE:
+ case SR_CONF_NUM_HDIV:
*data = g_variant_new_int32(model->num_xdivs);
ret = SR_OK;
break;