mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu/sriov:fix missing error handling
Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
98512bb8c2
commit
ab5d6227b7
|
@ -841,8 +841,11 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
|
|||
|
||||
if (amdgpu_sriov_vf(adev)) {
|
||||
r = amdgpu_map_static_csa(adev, &fpriv->vm, &fpriv->csa_va);
|
||||
if (r)
|
||||
if (r) {
|
||||
amdgpu_vm_fini(adev, &fpriv->vm);
|
||||
kfree(fpriv);
|
||||
goto out_suspend;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_init(&fpriv->bo_list_lock);
|
||||
|
|
Loading…
Reference in New Issue