]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fluke-dmm/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / fluke-dmm / api.c
index a2208049094648aa5146aacf2d6e5ec0023c9377..4519d3a5ac8f7126b5ad634cfac826e46bf94dd6 100644 (file)
@@ -127,10 +127,7 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm)
                                sdi->vendor = g_strdup("Fluke");
                                sdi->model = g_strdup(tokens[0] + 6);
                                sdi->version = g_strdup(tokens[1] + s);
-                               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->profile = &supported_flukedmm[i];
                                sdi->inst_type = SR_INST_SERIAL;
                                sdi->conn = serial;