/* Register the device with libsigrok. */
sdi = g_malloc0(sizeof(struct sr_dev_inst));
- sdi->status = SR_ST_INITIALIZING;
+ sdi->status = SR_ST_INACTIVE;
sdi->vendor = g_strdup("ChronoVu");
sdi->model = g_strdup(devc->prof->modelname);
sdi->serial_num = g_strdup(serial_num);
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
- if (!(devc = sdi->priv))
- return SR_ERR_BUG;
+ devc = sdi->priv;
switch (key) {
case SR_CONF_SAMPLERATE: