}
break;
case SR_CONF_VDIV:
- if (!cg) {
- sr_err("No channel group specified.");
+ if (!cg)
return SR_ERR_CHANNEL_GROUP;
- }
g_variant_get(data, "(tt)", &p, &q);
for (i = 0; i < devc->model->analog_channels; i++) {
if (cg == devc->analog_groups[i]) {
sr_dbg("Didn't set vdiv, unknown channel(group).");
return SR_ERR_NA;
case SR_CONF_COUPLING:
- if (!cg) {
- sr_err("No channel group specified.");
+ if (!cg)
return SR_ERR_CHANNEL_GROUP;
- }
tmp_str = g_variant_get_string(data, NULL);
for (i = 0; i < devc->model->analog_channels; i++) {
if (cg == devc->analog_groups[i]) {
sr_dbg("Didn't set coupling, unknown channel(group).");
return SR_ERR_NA;
case SR_CONF_PROBE_FACTOR:
- if (!cg) {
- sr_err("No channel group specified.");
+ if (!cg)
return SR_ERR_CHANNEL_GROUP;
- }
p = g_variant_get_uint64(data);
for (i = 0; i < devc->model->analog_channels; i++) {
if (cg == devc->analog_groups[i]) {
g_variant_unref(data);
+ if (ret == SR_ERR_CHANNEL_GROUP)
+ sr_err("%s: No channel group specified.",
+ (sdi) ? sdi->driver->name : "unknown");
+
return ret;
}