]> git.baikalelectronics.ru Git - kernel.git/commit
drm: fb: cma: Fail gracefully on allocation failure
authorThierry Reding <thierry.reding@avionic-design.de>
Sat, 20 Oct 2012 10:32:47 +0000 (10:32 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 23 Oct 2012 00:14:58 +0000 (10:14 +1000)
commit78949b18b83cd6485a373c88a13ce256bb93987a
tree6c73fe777af9c267263e58dc040f339fccc9d30f
parent8f9391f818c9f20b9b043b7a7063e1b0c851ba0f
drm: fb: cma: Fail gracefully on allocation failure

The drm_gem_cma_create() function never returns NULL but rather an error
encoded in the return value using the ERR_PTR() macro. Callers therefore
need to check for errors using the IS_ERR() macro. This change allows
drivers to handle contiguous DMA allocation failures gracefully.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fb_cma_helper.c