drm/exynos: return NULL if exynos_pages_to_sg fails
authorSubash Patel <subash.rp@samsung.com>
Mon, 25 Jun 2012 18:22:56 +0000 (11:22 -0700)
committerInki Dae <inki.dae@samsung.com>
Fri, 27 Jul 2012 02:13:55 +0000 (11:13 +0900)
commit56fb5380c76d75d30b0e7acdfd36de34b4ee4375
treea54ebe3160e8f13f6eabed44abe00d363a60ad06
parent9416dfa76ab418a2ba71ec1027f3c0af674d6e23
drm/exynos: return NULL if exynos_pages_to_sg fails

exynos_pages_to_sg() internally calls sg_kmalloc() which can return
no pages when the system is under high memory crunch. One such instance
is chromeos-install in the chromeos. This patch adds check for the return
value of the function in subject to return NULL on failure.

Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_dmabuf.c