OSDN Git Service

drm/amd/pp: Fix memory leak in error path in smumgr
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 14 Mar 2018 08:14:59 +0000 (16:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Mar 2018 14:55:46 +0000 (09:55 -0500)
commitfd06518d576ee3f0a51a9b1201f25608b774e60f
tree6ea885f199324b7bed4717e2ba4ad49a6683f4d5
parent116af45059139e8a156c9993bc4aa94625bd9c5e
drm/amd/pp: Fix memory leak in error path in smumgr

Free the backend structure if we fail to allocate device memory.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c