]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
Return SR_ERR_MALLOC upon allocation errors.
[libsigrok.git] / hardware / demo / demo.c
index 8300e6f4eac401212bb2852db911a24668199f0d..b8a4c242b048b5a8dd0c1c4226136be3d0cff9a1 100644 (file)
@@ -145,8 +145,8 @@ static int hw_init(void)
        struct drv_context *drvc;
 
        if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
-               sr_err("fx2lafw: driver context malloc failed.");
-               return SR_ERR;
+               sr_err("demo: driver context malloc failed.");
+               return SR_ERR_MALLOC;
        }
        ddi->priv = drvc;