anv: Add missing error-checking to anv_block_pool_init (v2)
authorGwan-gyeong Mun <elongbug@gmail.com>
Fri, 25 Nov 2016 14:34:42 +0000 (23:34 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 28 Nov 2016 21:11:25 +0000 (21:11 +0000)
commitecc618b0d88e462270ffedf01502ede4c60fdad9
tree64c62a71c716a49fa960f7a57e440f7f987b63d7
parent02bf1bbe6e81cebe662dda12167f6d2f9823b39b
anv: Add missing error-checking to anv_block_pool_init (v2)

When the memfd_create() and u_vector_init() fail on anv_block_pool_init(),
this patch makes to return VK_ERROR_INITIALIZATION_FAILED.
All of initialization success on anv_block_pool_init(), it makes to return
VK_SUCCESS.

CID 1394319

v2: Fixes from Emil's review:
  a) Add the return type for propagating the return value to caller.
  b) Changed anv_block_pool_init() to return VK_ERROR_INITIALIZATION_FAILED
     on failure of initialization.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_private.h