X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=f9ba81b8051cd6b331b2021cb83374e38880f88b;hb=0af636bed97c174bea46e61e961eaa1b0b162e0f;hp=31c11e2b361caacf439ad49bf3db9051ab3125e8;hpb=c7e455625807d31fcaf95f36a23f1afeba033e1f;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 31c11e2b..f9ba81b8 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -75,16 +75,15 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi if (check_manufacturer(hw_info->manufacturer) != SR_OK) goto fail; - if (!(sdi = sr_dev_inst_new(SR_ST_ACTIVE, - hw_info->manufacturer, hw_info->model, - hw_info->firmware_version))) { - goto fail; - } - + sdi = sr_dev_inst_new(); + sdi->status = SR_ST_ACTIVE; + sdi->vendor = g_strdup(hw_info->manufacturer); + sdi->model = g_strdup(hw_info->model); + sdi->version = g_strdup(hw_info->firmware_version); + sdi->serial_num = g_strdup(hw_info->serial_number); sdi->driver = di; sdi->inst_type = SR_INST_SCPI; sdi->conn = scpi; - sdi->serial_num = g_strdup(hw_info->serial_number); sr_scpi_hw_info_free(hw_info); hw_info = NULL;