drm/radeon: check return value of radeon_ring_lock()
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>
Tue, 8 Aug 2023 18:04:16 +0000 (11:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:32 +0000 (15:35 -0800)
commit18bd4d184675fbb2fc4b2f9b80aaebea2e05fca0
tree3b31f1e9e2c39fb7554a073ba9dcae84284247f3
parent056484916a131ebad65ee33048ec959f6186befc
drm/radeon: check return value of radeon_ring_lock()

[ Upstream commit 71225e1c930942cb1e042fc08c5cc0c4ef30e95e ]

In the unlikely event of radeon_ring_lock() failing, its errno return
value should be processed. This patch checks said return value and
prints a debug message in case of an error.

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

Fixes: 48c0c902e2e6 ("drm/radeon/kms: add support for CP setup on SI")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/radeon/si.c