X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fnorma-dmm%2Fapi.c;h=3e6eab7805c100c807b4302add1a41f438341105;hb=208c1d35435626a11afa1ab301b2071b2a4e187b;hp=9e0be393113987ce81fe730082618f17177f9efe;hpb=0cadb8a350578d857423a3bf3c0ed990cdb2608e;p=libsigrok.git diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 9e0be393..3e6eab78 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -254,15 +254,12 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) struct dev_context *devc; struct sr_serial_dev_inst *serial; - if (!sdi || !cb_data || !(devc = sdi->priv)) - return SR_ERR_BUG; - if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; + devc = sdi->priv; devc->cb_data = cb_data; - /* Send header packet to the session bus. */ std_session_send_df_header(cb_data, LOG_PREFIX); /* Start timer, if required. */