X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flcr%2Fes51919.c;h=3a987c626928c1a62b1953077713383fa18b5bf0;hb=d05b1a860606e078eed77722d8a0c62850ee39af;hp=af0dced9125bd376df8ec4f151fb0e8739adf1b0;hpb=693c52482a55f7eee9da11b084971560058aebef;p=libsigrok.git diff --git a/src/lcr/es51919.c b/src/lcr/es51919.c index af0dced9..3a987c62 100644 --- a/src/lcr/es51919.c +++ b/src/lcr/es51919.c @@ -741,14 +741,11 @@ static const char *const channel_names[] = { "P1", "P2" }; static int setup_channels(struct sr_dev_inst *sdi) { unsigned int i; - int ret; - - ret = SR_ERR_BUG; for (i = 0; i < ARRAY_SIZE(channel_names); i++) sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]); - return ret; + return SR_OK; } SR_PRIV void es51919_serial_clean(void *priv) @@ -802,10 +799,8 @@ SR_PRIV struct sr_dev_inst *es51919_serial_scan(GSList *options, scan_cleanup: es51919_serial_clean(devc); - if (sdi) - sr_dev_inst_free(sdi); - if (serial) - sr_serial_dev_inst_free(serial); + sr_dev_inst_free(sdi); + sr_serial_dev_inst_free(serial); return NULL; }