X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fapi.c;h=cac7cfc1462b51269d3a019711736c3f297e4e38;hb=7d0f52f7e5cb16d204490ca4006983237bf3df7d;hp=085f46c7bc7cefab8d8fc0f2a9e107da1fcd17e8;hpb=42d14d9108de61ead41aebe74d668239ee7d5089;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 085f46c7..cac7cfc1 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -67,7 +67,7 @@ static struct sr_dev_inst *dev_inst_new(const struct model_info *model) sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->status = SR_ST_INACTIVE; - sdi->vendor = g_strdup("SysClk"); + sdi->vendor = g_strdup("Sysclk"); sdi->model = g_strdup(model->name); sdi->priv = devc; @@ -79,7 +79,7 @@ static struct sr_dev_inst *dev_inst_new(const struct model_info *model) return sdi; } -/* Create a new device instance for a libusb device if it is a SysClk LWLA +/* Create a new device instance for a libusb device if it is a Sysclk LWLA * device and also matches the connection specification. */ static struct sr_dev_inst *dev_inst_new_matching(GSList *conn_matches, @@ -121,7 +121,7 @@ static struct sr_dev_inst *dev_inst_new_matching(GSList *conn_matches, } else { if (conn_matches) sr_warn("USB device %d.%d (%04x:%04x) is not a" - " SysClk LWLA.", bus, address, vid, pid); + " Sysclk LWLA.", bus, address, vid, pid); return NULL; } sdi = dev_inst_new(model); @@ -588,6 +588,8 @@ static int config_list(uint32_t key, GVariant **data, (devc) ? devc->model->num_devopts : 0); } + if (!devc) + return SR_ERR_ARG; if (!has_devopt(devc->model, key | SR_CONF_LIST)) return SR_ERR_NA; @@ -638,7 +640,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) static struct sr_dev_driver sysclk_lwla_driver_info = { .name = "sysclk-lwla", - .longname = "SysClk LWLA series", + .longname = "Sysclk LWLA series", .api_version = 1, .init = std_init, .cleanup = std_cleanup,