drm/amd/display: Fixed incorrect return value for validaton
authorYongqiang Sun <yongqiang.sun@amd.com>
Thu, 21 Sep 2017 14:46:33 +0000 (10:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:42:43 +0000 (16:42 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

index d9a2d09a1f4f38ffc37004e304a26f1e486cdc9f..bbfec7cb2ad1952dcf27a3ccc157e139bc4af2f6 100644 (file)
@@ -1723,10 +1723,11 @@ enum dc_status dc_validate_global_state(
        enum dc_status result = DC_ERROR_UNEXPECTED;
        int i, j;
 
-       if (dc->res_pool->funcs->validate_global &&
-                       dc->res_pool->funcs->validate_global(
-                       dc, new_ctx) != DC_OK)
-               return false;
+       if (dc->res_pool->funcs->validate_global) {
+                       result = dc->res_pool->funcs->validate_global(dc, new_ctx);
+                       if (result != DC_OK)
+                               return result;
+       }
 
        for (i = 0; new_ctx && i < new_ctx->stream_count; i++) {
                struct dc_stream_state *stream = new_ctx->streams[i];