X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=31c11e2b361caacf439ad49bf3db9051ab3125e8;hb=b33db61c48dd8ac2f6e7e3262da2d9399bd4bd53;hp=78cdc1733157fc0b5dba9cb47bfd5af67b1b2cf1;hpb=d08667c53b52ff7015de883dfc45906323eb2aa5;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 78cdc173..31c11e2b 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -80,16 +80,19 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi hw_info->firmware_version))) { goto fail; } + + 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; if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) goto fail; - sdi->driver = di; sdi->priv = devc; - sdi->inst_type = SR_INST_SCPI; - sdi->conn = scpi; if (hmo_init_device(sdi) != SR_OK) goto fail;