diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index d4aa4923..cf6bc65b 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -560,7 +560,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, /* Prime the pipe with the first channel's fetch. */ ch = next_enabled_channel(sdi, NULL); pch = ch->priv; - if ((ret = select_channel(sdi, ch)) != SR_OK) + if ((ret = select_channel(sdi, ch)) < 0) return ret; if (pch->mq == SR_MQ_VOLTAGE) cmd = SCPI_CMD_GET_MEAS_VOLTAGE; diff --git a/src/hardware/scpi-pps/protocol.c b/src/hardware/scpi-pps/protocol.c index 26ff8216..a27089f5 100644 --- a/src/hardware/scpi-pps/protocol.c +++ b/src/hardware/scpi-pps/protocol.c @@ -149,7 +149,7 @@ SR_PRIV int select_channel(const struct sr_dev_inst *sdi, struct sr_channel *ch) } } - if ((ret = scpi_cmd(sdi, SCPI_CMD_SELECT_CHANNEL, new_pch->hwname)) == SR_OK) + if ((ret = scpi_cmd(sdi, SCPI_CMD_SELECT_CHANNEL, new_pch->hwname)) >= 0) devc->cur_channel = ch; return ret;