]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/yokogawa-dlm/api.c
sr_dev_inst_free(): Allow NULL as argument.
[libsigrok.git] / src / hardware / yokogawa-dlm / api.c
index 103bb03054cca6ceeb46bc18061c7f2d26d743e1..e14e847d9d6346ea845642299b538950ca44b2ec 100644 (file)
@@ -43,14 +43,14 @@ static const uint32_t dlm_devopts[] = {
        SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_NUM_HDIV | SR_CONF_GET,
        SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const uint32_t dlm_analog_devopts[] = {
-       SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_NUM_VDIV | SR_CONF_GET,
+       SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const uint32_t dlm_digital_devopts[] = {
@@ -111,8 +111,7 @@ static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
 fail:
        if (hw_info)
                sr_scpi_hw_info_free(hw_info);
-       if (sdi)
-               sr_dev_inst_free(sdi);
+       sr_dev_inst_free(sdi);
        g_free(devc);
 
        return NULL;
@@ -660,7 +659,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
 
-       std_session_send_df_end(sdi, LOG_PREFIX);
+       std_session_send_df_end(sdi);
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;