]> sigrok.org Git - libsigrok.git/blobdiff - hardware/colead-slm/api.c
sr_driver_init(): Improve checks.
[libsigrok.git] / hardware / colead-slm / api.c
index 048fdd918e84587d8be369e4a27fcc4f0c4c7bc3..fd6112d86b80b6042e3cf8c2b7414daaa68a2f53 100644 (file)
@@ -78,7 +78,7 @@ static int hw_init(struct sr_context *sr_ctx)
 
        if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
                sr_err("Driver context malloc failed.");
-               return SR_ERR;
+               return SR_ERR_MALLOC;
        }
 
        drvc->sr_ctx = sr_ctx;