]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/radeon/ci_dpm: Remove needless NULL checks of dpm tables
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>
Tue, 14 Jan 2025 13:58:56 +0000 (05:58 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:02:56 +0000 (21:02 -0500)
commit189abca05a89fc7b422811e497a7116b3e4f4dca
tree08b8f1a8407064ff9d601f7bf4c067fbd18f449a
parentf7a594e40517fa2ab25d5ca10e7b6a158f529fb5
drm/radeon/ci_dpm: Remove needless NULL checks of dpm tables

This patch removes useless NULL pointer checks in functions like
ci_set_private_data_variables_based_on_pptable() and
ci_setup_default_dpm_tables().

The pointers in question are initialized as addresses to existing
structures such as rdev->pm.dpm.dyn_state.vddc_dependency_on_sclk by
utilizing & operator and therefore are not in danger of being NULL.

Fix this by removing extra checks thus cleaning the code a tiny bit.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ci_dpm.c