aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch
new file mode 100644
index 00000000..d09386e8
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1842-drm-amdgpu-sriov-fix-missing-error-handling.patch
@@ -0,0 +1,35 @@
+From ae79bf7e9918c013ceefbbb9862051ef896bea79 Mon Sep 17 00:00:00 2001
+From: Monk Liu <Monk.Liu@amd.com>
+Date: Tue, 12 Sep 2017 14:33:29 +0800
+Subject: [PATCH 1842/4131] drm/amdgpu/sriov:fix missing error handling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: Ifc6942ed0221f3134bfba4d66fde743484191da3
+Signed-off-by: Monk Liu <Monk.Liu@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+index 9f5a111..dd9b245 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+@@ -885,8 +885,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);
+--
+2.7.4
+