summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/drm/drm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index b28780a0da7..86120e38f80 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -455,12 +455,12 @@ drmclose(dev_t kdev, int flags, int fmt, struct proc *p)
DRM_LOCK();
file_priv = drm_find_file_by_minor(dev, minor(kdev));
- DRM_UNLOCK();
if (file_priv == NULL) {
DRM_ERROR("can't find authenticator\n");
retcode = EINVAL;
goto done;
}
+ DRM_UNLOCK();
if (dev->driver->close != NULL)
dev->driver->close(dev, file_priv);