X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fhantek-dso%2Fapi.c;h=f38c80d7b68a6da27abb5363edb567218ed08e84;hb=b0c8d7ac7f698f75aeb1c4b201c90360bae009e8;hp=ebb4edc2e9cde85aab6a507df6c53696a9e631c1;hpb=7dfcf010a0331359529f52f7a09d6d324d96284f;p=libsigrok.git 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;