]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lascar-el-usb/protocol.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / lascar-el-usb / protocol.c
index 49ed649b2707f463260db29b23077902e250043e..c18357b35278068f72f078ef9a0b81f8954308f7 100644 (file)
@@ -348,8 +348,7 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config)
                        sdi->channels = g_slist_append(NULL, ch);
                }
 
-               if (!(devc = g_try_malloc0(sizeof(struct dev_context))))
-                       return NULL;
+               devc = g_malloc0(sizeof(struct dev_context));
                sdi->priv = devc;
                devc->profile = profile;
        }