summaryrefslogtreecommitdiff
path: root/linux/drm_fops.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_fops.h')
-rw-r--r--linux/drm_fops.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux/drm_fops.h b/linux/drm_fops.h
index 21935b7a..0e91190a 100644
--- a/linux/drm_fops.h
+++ b/linux/drm_fops.h
@@ -73,11 +73,10 @@ int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev)
priv->authenticated = capable(CAP_SYS_ADMIN);
priv->lock_count = 0;
- if (dev->fn_tbl.open_helper)
- {
- ret=dev->fn_tbl.open_helper(dev, priv);
- if (ret < 0)
- goto out_free;
+ if (dev->fn_tbl.open_helper) {
+ ret=dev->fn_tbl.open_helper(dev, priv);
+ if (ret < 0)
+ goto out_free;
}
down(&dev->struct_sem);
@@ -110,8 +109,9 @@ int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev)
#endif
return 0;
- out_free:
+out_free:
DRM(free)(priv, sizeof(*priv), DRM_MEM_FILES);
+ filp->private_data=NULL;
return ret;
}