X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fapi.c;h=41f71d1bb2ab86d5585d82e029dbd1e327f7697c;hb=adfba7368ac297bba20b0afbc7d7322309508b30;hp=a4a679a4e32159a5e71ed8bb8921b0d37820a663;hpb=aab4b8cb70e08369760383d9b9302085db298a44;p=libsigrok.git diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index a4a679a4..41f71d1b 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -238,10 +238,11 @@ static GSList *scan(GSList *options) if (!prof) continue; - sdi = sr_dev_inst_new(SR_ST_INITIALIZING, - prof->vendor, prof->model, prof->model_version); - if (!sdi) - return NULL; + sdi = sr_dev_inst_new(); + sdi->status = SR_ST_INITIALIZING; + sdi->vendor = g_strdup(prof->vendor); + sdi->model = g_strdup(prof->model); + sdi->version = g_strdup(prof->model_version); sdi->driver = di; sdi->serial_num = g_strdup(serial_num); sdi->connection_id = g_strdup(connection_id);