aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r--drivers/gpu/drm/drm_vm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 55cd61567812..149561818349 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -680,6 +680,9 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
680 struct drm_device *dev = priv->minor->dev; 680 struct drm_device *dev = priv->minor->dev;
681 int ret; 681 int ret;
682 682
683 if (drm_device_is_unplugged(dev))
684 return -ENODEV;
685
683 mutex_lock(&dev->struct_mutex); 686 mutex_lock(&dev->struct_mutex);
684 ret = drm_mmap_locked(filp, vma); 687 ret = drm_mmap_locked(filp, vma);
685 mutex_unlock(&dev->struct_mutex); 688 mutex_unlock(&dev->struct_mutex);