summaryrefslogtreecommitdiff
path: root/drivers/staging/dgap
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-12-16 21:07:52 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 08:57:21 -0800
commitf4ea823be2ca9e61522de002804c9a7a54c9be16 (patch)
treed2112af9d59654f5f8b36588e5404cea256f19cb /drivers/staging/dgap
parent679bcc935c4ed45e3f9c56f5d0c766b0844c93a9 (diff)
staging: ion: Fix possible null pointer dereference
The kbuild test robot reported: drivers/staging/android/ion/ion_system_heap.c:122 alloc_largest_available() error: potential null dereference 'info'. (kmalloc returns null) Where the pointer returned from kmalloc goes unchecked for failure. This patch checks the return for NULL, and reworks the logic, as suggested by Colin, so we allocate the page_info structure first. Acked-by: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
0 files changed, 0 insertions, 0 deletions