]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/arachnid-labs-re-load-pro/api.c
drivers: Remove some uneeded 'ret' variables.
[libsigrok.git] / src / hardware / arachnid-labs-re-load-pro / api.c
index 4fcd7b8541a1904df1dc90db45decba5b7386a86..bfbdd7d477a54bd4da7daf6db7ca04192fa506a6 100644 (file)
@@ -151,7 +151,6 @@ static int config_list(uint32_t key, GVariant **data,
        const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        GVariantBuilder gvb;
-       int ret;
 
        /* Always available. */
        if (key == SR_CONF_SCAN_OPTIONS) {
@@ -169,8 +168,6 @@ static int config_list(uint32_t key, GVariant **data,
        if (!sdi)
                return SR_ERR_ARG;
 
-       ret = SR_OK;
-
        if (!cg) {
                /* No channel group: global options. */
                switch (key) {
@@ -200,14 +197,13 @@ static int config_list(uint32_t key, GVariant **data,
                }
        }
 
-       return ret;
+       return SR_OK;
 }
 
 static int config_get(uint32_t key, GVariant **data,
        const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
-       int ret;
        float fvalue;
 
        (void)cg;
@@ -223,7 +219,6 @@ static int config_get(uint32_t key, GVariant **data,
         *  - SR_CONF_ENABLED (state cannot be queried, only set)
         */
 
-       ret = SR_OK;
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
        case SR_CONF_LIMIT_MSEC:
@@ -267,7 +262,7 @@ static int config_get(uint32_t key, GVariant **data,
                return SR_ERR_NA;
        }
 
-       return ret;
+       return SR_OK;
 }
 
 static int config_set(uint32_t key, GVariant *data,