]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:11 +0000 (10:11 +0100)
[ Upstream commit c35376137e940c3389df2726a92649c01a9844b4 ]

On an error exit path, a negative error code should be returned
instead of a positive return value.

Fixes: 9e869063b0021 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index a717a4904268ecbf4a8b3ef8dd31bfa0eacc218c..5474f7e4c75b1b183bace35abad1532b53a2341f 100644 (file)
@@ -8217,8 +8217,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;
                }