]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Fix wrong return value in dm_update_plane_state()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Sun, 2 Aug 2020 11:15:36 +0000 (19:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2020 19:42:54 +0000 (15:42 -0400)
On an error exit path, a negative error code should be returned
instead of a positive return value.

Fixes: 4af6690ca0428 ("drm/amd/display: Move iteration out of dm_update_planes")
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 27dfd285a9445d8366be30fc2e5156446bf0be23..7f6a91b4fe4e11e808b711f65452e433a5d74a83 100644 (file)
@@ -8343,8 +8343,7 @@ static int dm_update_plane_state(struct dc *dc,
                                dm_old_plane_state->dc_state,
                                dm_state->context)) {
 
-                       ret = EINVAL;
-                       return ret;
+                       return -EINVAL;
                }