staging: android: ion: dummy: fix an error code
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 20 Jan 2014 10:30:01 +0000 (13:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 19:08:46 +0000 (11:08 -0800)
We should be returning -ENOMEM here instead of zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_dummy_driver.c

index df8228b088567fc651128d5b0778990b12862732..01cdc8aee898a35cd98fc3437a31b1b066f6b92a 100644 (file)
@@ -71,7 +71,7 @@ static int __init ion_dummy_init(void)
        heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
                        GFP_KERNEL);
        if (!heaps)
-               return PTR_ERR(heaps);
+               return -ENOMEM;
 
 
        /* Allocate a dummy carveout heap */