new-driver: Return SR_ERR_MALLOC upon mem errors.
authorUwe Hermann <uwe@hermann-uwe.de>
Fri, 2 Nov 2012 14:46:46 +0000 (15:46 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 2 Nov 2012 14:46:46 +0000 (15:46 +0100)
source/drv-api.c

index dbeea02fc826207e771ed104d85f84228202362c..3d71daa08fd211d271d1c49e8203882ed380aa62 100644 (file)
@@ -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 */