From: Uwe Hermann Date: Fri, 2 Nov 2012 14:46:46 +0000 (+0100) Subject: new-driver: Return SR_ERR_MALLOC upon mem errors. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3e01cf3eb81b9e71d257c626cd2bc9c9e4ea61b1;p=sigrok-util.git new-driver: Return SR_ERR_MALLOC upon mem errors. --- diff --git a/source/drv-api.c b/source/drv-api.c index dbeea02..3d71daa 100644 --- a/source/drv-api.c +++ b/source/drv-api.c @@ -57,7 +57,7 @@ static int hw_init(void) if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) { sr_err("Driver context malloc failed."); - return SR_ERR; + return SR_ERR_MALLOC; } /* TODO */