demo: Fix compiler warning, cosmetics.
This commit is contained in:
parent
1d16675769
commit
e45ad6e24f
|
@ -172,8 +172,8 @@ static GSList *hw_scan(GSList *options)
|
||||||
|
|
||||||
sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL);
|
sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL);
|
||||||
if (!sdi) {
|
if (!sdi) {
|
||||||
sr_err("%s: sr_dev_inst_new failed", __func__);
|
sr_err("Device instance creation failed.");
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
sdi->driver = di;
|
sdi->driver = di;
|
||||||
|
|
||||||
|
@ -188,8 +188,8 @@ static GSList *hw_scan(GSList *options)
|
||||||
drvc->instances = g_slist_append(drvc->instances, sdi);
|
drvc->instances = g_slist_append(drvc->instances, sdi);
|
||||||
|
|
||||||
if (!(devc = g_try_malloc(sizeof(struct dev_context)))) {
|
if (!(devc = g_try_malloc(sizeof(struct dev_context)))) {
|
||||||
sr_err("%s: devc malloc failed", __func__);
|
sr_err("Device context malloc failed.");
|
||||||
return SR_ERR_MALLOC;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
devc->sdi = sdi;
|
devc->sdi = sdi;
|
||||||
|
|
Loading…
Reference in New Issue