[PATCH] drm/amd/display: Remove else after return statement in 'dm_update_plane_state'
Rodrigo Siqueira Jordao
Rodrigo.Siqueira at amd.com
Wed Jun 21 15:57:26 UTC 2023
On 6/19/23 06:02, Srinivasan Shanmugam wrote:
> Else is not necessary after return statements, hence remove it.
>
> Reported by checkpatch:
>
> WARNING: else is not generally useful after a break or return
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:9776:
> return -EINVAL;
> else
>
> Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
> Cc: Qingqing Zhuo <qingqing.zhuo at amd.com>
> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas at amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 2446529c329a..e657214e0104 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -9777,8 +9777,8 @@ static int dm_update_plane_state(struct dc *dc,
> if (plane->type == DRM_PLANE_TYPE_OVERLAY) {
> if (is_video_format(new_plane_state->fb->format->format) && *is_top_most_overlay)
> return -EINVAL;
> - else
> - *is_top_most_overlay = false;
> +
> + *is_top_most_overlay = false;
> }
>
> DRM_DEBUG_ATOMIC("Enabling DRM plane: %d on DRM crtc %d\n",
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
More information about the amd-gfx
mailing list