Browse Source

staging: android: ion: dummy: fix an error code

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>
Dan Carpenter 11 years ago
parent
commit
630127f367
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/android/ion/ion_dummy_driver.c

+ 1 - 1
drivers/staging/android/ion/ion_dummy_driver.c

@@ -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 */