X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fcolead-slm%2Fapi.c;h=b75af7f6d2b8043c9f1f19d4dde441bcfe0399c8;hb=208c1d35435626a11afa1ab301b2071b2a4e187b;hp=0e2c9198fe16165ad05b9fdb928a0702d7db8589;hpb=c1aae90038456a61d0f9313d34e6107c3440d3e7;p=libsigrok.git diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c index 0e2c9198..b75af7f6 100644 --- a/src/hardware/colead-slm/api.c +++ b/src/hardware/colead-slm/api.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -178,14 +179,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) 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; - } - + devc = sdi->priv; devc->cb_data = cb_data; - /* Send header packet to the session bus. */ std_session_send_df_header(cb_data, LOG_PREFIX); /* Poll every 150ms, or whenever some data comes in. */