drm/amd/display: Remove else after return in 'dm_vblank_get_counter' & 'amdgpu_dm_bac...
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Sun, 23 Jul 2023 09:22:09 +0000 (14:52 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jul 2023 17:47:26 +0000 (13:47 -0400)
commit53e1db06775ab433d9e66993b683274dd36e63d0
treea26fc4c9be4e809dfa96910f431b5e5bf7fc3e7f
parent50fbe0cc9599f5956b35e1b1834d75b14b10bbb5
drm/amd/display: Remove else after return in 'dm_vblank_get_counter' & 'amdgpu_dm_backlight_get_level'

Expressions under 'else' branch in function 'dm_vblank_get_counter' &
'amdgpu_dm_backlight_get_level' are executed whenever the expression in
'if' is False. Otherwise, return from function occurs. Therefore, there is
no need in 'else', and it has been removed.

Fixes the following:

WARNING: else is not generally useful after a break or return
+               return 0;
+       else {

WARNING: else is not generally useful after a break or return
+               return convert_brightness_to_user(&caps, avg);
+       } else {

Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c