uni-t-ut181a: silence compiler warning, use of uninitialized variable
[libsigrok.git] / src / hardware / uni-t-ut181a / api.c
index de64f2f273f1319f6fbeb207ed433014b70e1525..5e12e7dae60cc2880cd4744bd0e3c5c160135f01 100644 (file)
@@ -532,6 +532,10 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                devc->info.rec_data.samples_total = devc->wait_state.data_value;
                devc->info.rec_data.samples_curr = 0;
                ret = ut181a_send_cmd_get_rec_samples(serial, rec_idx, 0);
+       } else {
+               sr_err("Unhandled data source %d, programming error?",
+                       (int)devc->data_source);
+               ret = SR_ERR_BUG;
        }
        if (ret < 0)
                return ret;