rigol-ds: Fix broken channel group check in config_list().
This commit is contained in:
parent
f579d08bc5
commit
40c2c9159c
|
@ -818,14 +818,9 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
|
|
||||||
/* If a channel group is specified, it must be a valid one. */
|
/* If a channel group is specified, it must be a valid one. */
|
||||||
if (cg) {
|
if (cg && !g_slist_find(sdi->channel_groups, cg)) {
|
||||||
for (i = 0; i < devc->model->analog_channels; i++)
|
sr_err("Invalid channel group specified.");
|
||||||
if (cg == devc->analog_groups[i])
|
return SR_ERR;
|
||||||
break;
|
|
||||||
if (i >= devc->model->analog_channels) {
|
|
||||||
sr_err("Invalid channel group specified.");
|
|
||||||
return SR_ERR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
|
Loading…
Reference in New Issue