drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed
authorChen Tao <chentao107@huawei.com>
Wed, 17 Jun 2020 10:51:30 +0000 (18:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:22 +0000 (01:59 -0400)
commit888e32d71115e26b57bdcbc717c68e9c5026bac3
tree2764a5142feae52013b2fc10caf1002807a1cb86
parent3e4aeff36e9212a939290c0ca70d4931c4ad1950
drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed

Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when
amdgpu_virt_enable_access_debugfs failed.

Fixes: 95a2f917387a2 ("drm/amdgpu: restrict debugfs register access under SR-IOV")
Signed-off-by: Chen Tao <chentao107@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c