]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/brymen-dmm/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / brymen-dmm / api.c
index 937135c6c1b77657ec7125beb785105aae519f39..0db5c2d83a7f8b9fba78eed01cab5eba673f6ccb 100644 (file)
@@ -79,12 +79,7 @@ static GSList *brymen_scan(const char *conn, const char *serialcomm)
        sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup("Brymen");
        sdi->model = g_strdup("BM85x");
-
-       if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
-               sr_err("Device context malloc failed.");
-               goto scan_cleanup;
-       }
-
+       devc = g_malloc0(sizeof(struct dev_context));
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
        drvc = di->priv;