From baf2f0b0eefbc83d20b36624e08c012158cf2d91 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Fri, 14 Oct 2016 14:18:56 -0600 Subject: loader: Fix compilation warning in debug_report.c Change-Id: I92e7f23217ef3897995514360c23849ef1cfadeb --- loader/debug_report.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/loader/debug_report.c b/loader/debug_report.c index 637bfd5a..4054d4ed 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -386,7 +386,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallback( out: // Roll back on errors - if (res != NULL) { + if (VK_SUCCESS != res) { storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { if (NULL == icd->DestroyDebugReportCallbackEXT) { @@ -419,12 +419,9 @@ out: free(icd_info); } } - - return res; } - - return VK_SUCCESS; + return res; } /* -- cgit v1.2.3