/*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
*
* Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
*
{
struct dev_context *devc;
- 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;
devc = sdi->priv;
{
struct dev_context *devc;
+ if (sdi->status != SR_ST_ACTIVE)
+ return SR_ERR_DEV_CLOSED;
+
devc = sdi->priv;
devc->cb_data = cb_data;