]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/sysclk-lwla/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / sysclk-lwla / api.c
index 90d7897dda3dee2f025c07119be0261cea688a39..1e3dd1d28ff6f725aa2d6b7571f5ebc3e7605e08 100644 (file)
@@ -105,11 +105,7 @@ static struct sr_dev_inst *dev_inst_new(void)
        struct dev_context *devc;
 
        /* Allocate memory for our private driver context. */
-       devc = g_try_new0(struct dev_context, 1);
-       if (!devc) {
-               sr_err("Device context malloc failed.");
-               return NULL;
-       }
+       devc = g_malloc0(sizeof(struct dev_context));
 
        /* Register the device with libsigrok. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));