radv: don't return VK_SUCCESS if radv_device_get_cache_uuid() fails

If radv_device_get_cache_uuid() fails result will be VK_SUCCESS as set
by the radv_init_wsi() call above.

Fixes: d943839 (radv: Use library mtime for cache UUID.)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Emil Velikov 2016-11-24 20:30:45 +00:00 committed by Emil Velikov
parent 78707a15f2
commit 7c277eae98
1 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,8 @@ radv_physical_device_init(struct radv_physical_device *device,
if (radv_device_get_cache_uuid(device->rad_info.family, device->uuid)) {
radv_finish_wsi(device);
device->ws->destroy(device->ws);
result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
"cannot generate UUID");
goto fail;
}