/*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
*
* Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
*
int ret;
uint64_t tmp_u64;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
devc = sdi->priv;
switch (id) {
int num_channels;
int i;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
devc = sdi->priv;
serial = sdi->conn;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR;
-
if (ols_configure_probes(sdi) != SR_OK) {
sr_err("Failed to configure probes.");
return SR_ERR;