Skip to content
Snippets Groups Projects
Commit 1435e895 authored by Wentao Liang's avatar Wentao Liang Committed by Alex Deucher
Browse files

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


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>
parent bd4b125e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment