Commit 55ef52c3 authored by Wentao Liang's avatar Wentao Liang Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: handle amdgpu_cgs_create_device() errors in amd_powerplay_create()



[ Upstream commit 1435e895 ]

Add error handling to propagate amdgpu_cgs_create_device() failures
to the caller. When amdgpu_cgs_create_device() fails, release hwmgr
and return -ENOMEM to prevent null pointer dereference.

[v1]->[v2]: Change error code from -EINVAL to -ENOMEM. Free hwmgr.

Signed-off-by: default avatarWentao Liang <vulab@iscas.ac.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent dd686b69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment