diff options
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 8eb0cdf200f..6fb20fed36a 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -3922,6 +3922,10 @@ i915_gem_idle(struct inteldrm_softc *dev_priv) struct drm_device *dev = (struct drm_device *)dev_priv->drmdev; int ret; + /* If drm attach failed */ + if (dev == NULL) + return (0); + DRM_LOCK(); if (dev_priv->mm.suspended || dev_priv->ring.ring_obj == NULL) { DRM_UNLOCK(); |