/*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
*
* Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
*
struct dev_context *devc;
if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR;
+ return SR_ERR_DEV_CLOSED;
if (!(devc = sdi->priv)) {
sr_err("sdi->priv was NULL.");
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
+ 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;