Avoid use of uninitialized memory in GrVkCaps.cpp

This came up on an internal scan
http://sponge2/c6a35152-1d6a-498a-9365-0960c007a491

properties appears to have been read even if the call failed.

Change-Id: I1730453537f9634d93ee83df193c2a9c4785564e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1156556
Commit-Queue: Kaylee Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ganesh/vk/GrVkCaps.cpp b/src/gpu/ganesh/vk/GrVkCaps.cpp
index 6b6a258..1e7563d 100644
--- a/src/gpu/ganesh/vk/GrVkCaps.cpp
+++ b/src/gpu/ganesh/vk/GrVkCaps.cpp
@@ -1483,13 +1483,17 @@
                               VK_IMAGE_USAGE_SAMPLED_BIT |
                               VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
     VkImageFormatProperties properties;
-    GR_VK_CALL(interface, GetPhysicalDeviceImageFormatProperties(physDev,
-                                                                 format,
-                                                                 VK_IMAGE_TYPE_2D,
-                                                                 VK_IMAGE_TILING_OPTIMAL,
-                                                                 usage,
-                                                                 0,  // createFlags
-                                                                 &properties));
+    VkResult result = GR_VK_CALL(interface,
+                                 GetPhysicalDeviceImageFormatProperties(physDev,
+                                                                        format,
+                                                                        VK_IMAGE_TYPE_2D,
+                                                                        VK_IMAGE_TILING_OPTIMAL,
+                                                                        usage,
+                                                                        0,  // createFlags
+                                                                        &properties));
+    if (result != VK_SUCCESS) {
+        return;
+    }
     VkSampleCountFlags flags = properties.sampleCounts;
     if (flags & VK_SAMPLE_COUNT_1_BIT) {
         fColorSampleCounts.push_back(1);