struct dev_context *devc;
int ret;
- if (sdi->status != SR_ST_ACTIVE) {
- sr_err("Device inactive, can't set config options.");
- return SR_ERR;
- }
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
if (!(devc = sdi->priv)) {
sr_err("sdi->priv was NULL.");
{
struct dev_context *devc;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
if (!(devc = sdi->priv)) {
sr_err("sdi->priv was NULL.");
return SR_ERR_BUG;