Skip to contentSkip to conversation

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

PATCH New Dan Carpenter 1 participant 1 message Jan 20, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: ion: dummy: fix an error code

We should be returning -ENOMEM here instead of zero.

drivers/staging/android/ion/ion_dummy_driver.c +1 -1
index 55b2002753f2..f0d786c539ea 100644
@@ -69,7 +69,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 */