gwinstek-gpd: Fix use of uninitialized variable
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
This commit is contained in:
parent
5652085a4e
commit
5ff772410b
|
@ -220,7 +220,7 @@ error:
|
||||||
static int config_get(uint32_t key, GVariant **data,
|
static int config_get(uint32_t key, GVariant **data,
|
||||||
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
|
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
|
||||||
{
|
{
|
||||||
int ret, channel;
|
int channel;
|
||||||
const struct dev_context *devc;
|
const struct dev_context *devc;
|
||||||
const struct sr_channel *ch;
|
const struct sr_channel *ch;
|
||||||
|
|
||||||
|
@ -244,7 +244,6 @@ static int config_get(uint32_t key, GVariant **data,
|
||||||
} else {
|
} else {
|
||||||
ch = cg->channels->data;
|
ch = cg->channels->data;
|
||||||
channel = ch->index;
|
channel = ch->index;
|
||||||
ret = SR_OK;
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case SR_CONF_VOLTAGE:
|
case SR_CONF_VOLTAGE:
|
||||||
*data = g_variant_new_double(
|
*data = g_variant_new_double(
|
||||||
|
@ -267,7 +266,7 @@ static int config_get(uint32_t key, GVariant **data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int config_set(uint32_t key, GVariant *data,
|
static int config_set(uint32_t key, GVariant *data,
|
||||||
|
|
Loading…
Reference in New Issue