hantek-dso: scan/info_get fixes

This commit is contained in:
Bert Vermeulen 2012-07-15 04:08:21 +02:00
parent 7dfcf010a0
commit b0c8d7ac7f
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof
prof->vendor, prof->model, NULL);
if (!sdi)
return NULL;
sdi->driver = hdi;
if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
sr_err("hantek-dso: ctx malloc failed");
@ -423,6 +424,8 @@ static int hw_info_get(int info_id, const void **data,
case SR_DI_CUR_SAMPLERATE:
*data = &tmp;
break;
default:
return SR_ERR_ARG;
}
return SR_OK;