X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fikalogic-scanaplus%2Fapi.c;h=f3cd81201ab2e0d8a226d136bc76cddedcca8696;hp=d8165c7d855a33718d3d8ce676151f6c245eb9cc;hb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;hpb=aac29cc192ccf82b64e77b5e6b11b411da32deed diff --git a/src/hardware/ikalogic-scanaplus/api.c b/src/hardware/ikalogic-scanaplus/api.c index d8165c7d..f3cd8120 100644 --- a/src/hardware/ikalogic-scanaplus/api.c +++ b/src/hardware/ikalogic-scanaplus/api.c @@ -88,10 +88,7 @@ static GSList *scan(GSList *options) devices = NULL; /* Allocate memory for our private device context. */ - if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) { - sr_err("Device context malloc failed."); - goto err_free_nothing; - } + devc = g_malloc0(sizeof(struct dev_context)); /* Allocate memory for the incoming compressed samples. */ if (!(devc->compressed_buf = g_try_malloc0(COMPRESSED_BUF_SIZE))) { @@ -154,7 +151,6 @@ err_free_compressed_buf: g_free(devc->compressed_buf); err_free_devc: g_free(devc); -err_free_nothing: return NULL; }