- if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
- VENDOR_NAME, prof->model_name, NULL))) {
- sr_err("%s: sr_dev_inst_new failed", __func__);
- return NULL;
- }
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
+ sdi->status = SR_ST_INACTIVE;
+ sdi->vendor = g_strdup(VENDOR_NAME);
+ sdi->model = g_strdup(prof->model_name);