]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / hameg-hmo / api.c
index d8a0f902ca26a0c53bb53ff4507ced775ec85e8e..8f27669ffde1c509b80e5ea728c5dbe53bc8bcec 100644 (file)
@@ -92,8 +92,7 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi
        sr_scpi_hw_info_free(hw_info);
        hw_info = NULL;
 
-       if (!(devc = g_try_malloc0(sizeof(struct dev_context))))
-               goto fail;
+       devc = g_malloc0(sizeof(struct dev_context));
 
        sdi->priv = devc;