]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Drop unnecessary 'rc' variable in amdgpu_dm_backlight_get_level()
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 25 Jun 2025 15:23:13 +0000 (10:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jul 2025 20:40:05 +0000 (16:40 -0400)
commit34c9cd82dc62641b9038815ebc1a397f24d5a6e2
treec442abc54e2bd19d65abdf391670f63880176cdc
parentca74cc428f2b9d0170c56b473dbcfd7fa01daf2d
drm/amd/display: Drop unnecessary 'rc' variable in amdgpu_dm_backlight_get_level()

[Why]
amdgpu_dm_backlight_get_level() returns a boolean value but is assigned
to a variable named 'rc' which is generally used for return codes.

This can be confusing while looking at the code for other issues.

[How]
Drop the variable and just look directly at the return value of
amdgpu_dm_backlight_get_level() in the if statement.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c