Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
630127f3 8b9e418c

+1 -1
+1 -1
drivers/staging/android/ion/ion_dummy_driver.c
··· 71 71 heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr, 72 72 GFP_KERNEL); 73 73 if (!heaps) 74 - return PTR_ERR(heaps); 74 + return -ENOMEM; 75 75 76 76 77 77 /* Allocate a dummy carveout heap */