提交 888e32d7 编写于 作者: C Chen Tao 提交者: Alex Deucher

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: 95a2f917 ("drm/amdgpu: restrict debugfs register access under SR-IOV")
Signed-off-by: NChen Tao <chentao107@huawei.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 3e4aeff3
......@@ -941,7 +941,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
r = amdgpu_virt_enable_access_debugfs(adev);
if (r < 0)
return r;
goto err;
/* switch to the specific se/sh/cu */
mutex_lock(&adev->grbm_idx_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册