OSDN Git Service

drm/amd/display: drop unnecessary NULL checks in debugfs
authorAlexey Kodanev <aleksei.kodanev@bell-sw.com>
Tue, 27 Dec 2022 17:04:15 +0000 (20:04 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jan 2023 16:42:21 +0000 (11:42 -0500)
commitf8e12e770e8049917f82387033b3cf44bc43b915
treef9ace194dbf13a0b54d745332d94614996ede62a
parent4a1c9a444b5e0f276f43f77e1723088bbedb1687
drm/amd/display: drop unnecessary NULL checks in debugfs

pipe_ctx pointer cannot be NULL when getting the address of
an element of the pipe_ctx array. Moreover, the MAX_PIPES is
defined as 6, so pipe_ctx is not NULL after the loop either.

Detected using the static analysis tool - Svace.

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c