]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/uni-t-dmm/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / uni-t-dmm / api.c
index cf9185109d0ca53f4449cd6fce075c37ecc7e0a6..6feefed1b182a3afec5f0475f2a22fe494d13df1 100644 (file)
@@ -253,10 +253,7 @@ static GSList *scan(GSList *options, int dmm)
        for (l = usb_devices; l; l = l->next) {
                usb = l->data;
 
-               if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
-                       sr_err("Device context malloc failed.");
-                       return NULL;
-               }
+               devc = g_malloc0(sizeof(struct dev_context));
 
                devc->first_run = TRUE;