create_image wrongly returns VK_SUCCESS if ahardwarebuffer_image_allocate fails
I've been seeing a weird crash on Android whilst running the CTS swapchain creation test parameters test - when testing GL_RGBA16, ahardwarebuffer_image_allocate fails because it doesn't know of any corresponding hardware format, but vk_ic_allocate plows ahead anyway and tries to create the remaining images like it hasn't noticed the failure and then there's a segfault in the graphics driver. On closer inspection, create_image saves the result of ahardwarebuffer_image_allocate to the variable xrt_res, checks it, and prints an error and returns if it failed. However, it returns the value stored in a different variable ret, which is set to VK_SUCCESS earlier in the function and never changed. vk_ic_allocate then looks at that return value and thinks create_image succeeded when in reality it failed and bailed out right at the start.
Modifying it to return an error instead fixes the crash, but it's not possible to return the result of ahardwarebuffer_image_allocate directly since it's a xrt_result_t and create_image returns a VkResult, and I'm not sure what the correct error is for it to return. Also, apologies for the noise earlier when I misread the code as actually returning the error it got.