From: Bert Vermeulen Date: Sun, 15 Jul 2012 02:08:21 +0000 (+0200) Subject: hantek-dso: scan/info_get fixes X-Git-Tag: dsupstream~799 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b0c8d7ac7f698f75aeb1c4b201c90360bae009e8;p=libsigrok.git hantek-dso: scan/info_get fixes --- diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index ebb4edc2..f38c80d7 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -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;