X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fsaleae-logic16%2Fapi.c;h=21ccd557b69a6865e8d1a6962f221d41cf9c647a;hb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;hp=c3aaacc52c0a83250848697b30298fa3cde1eabf;hpb=aac29cc192ccf82b64e77b5e6b11b411da32deed;p=libsigrok.git diff --git a/src/hardware/saleae-logic16/api.c b/src/hardware/saleae-logic16/api.c index c3aaacc5..21ccd557 100644 --- a/src/hardware/saleae-logic16/api.c +++ b/src/hardware/saleae-logic16/api.c @@ -212,8 +212,7 @@ static GSList *scan(GSList *options) sdi->channels = g_slist_append(sdi->channels, ch); } - if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) - return NULL; + devc = g_malloc0(sizeof(struct dev_context)); devc->selected_voltage_range = VOLTAGE_RANGE_18_33_V; sdi->priv = devc; drvc->instances = g_slist_append(drvc->instances, sdi);