summaryrefslogtreecommitdiff
path: root/linux-core/drm_fops.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2005-06-30 16:00:35 +0000
committerJon Smirl <jonsmirl@yahoo.com>2005-06-30 16:00:35 +0000
commite2ba08d28335b43515ccbefcc21052ed0d5a7e47 (patch)
treeb6f849906d15835af0769a3213e72b651f25de30 /linux-core/drm_fops.c
parent1b4ce02506afa65494956468afb0eb7f93b74fbc (diff)
release can happen before dev->ctxlist is allocated
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r--linux-core/drm_fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index fd1704b8..74c7e93c 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -401,7 +401,7 @@ int drm_release(struct inode *inode, struct file *filp)
drm_fasync(-1, filp, 0);
down(&dev->ctxlist_sem);
- if (!list_empty(&dev->ctxlist->head)) {
+ if (dev->ctxlist && (!list_empty(&dev->ctxlist->head))) {
drm_ctx_list_t *pos, *n;
list_for_each_entry_safe(pos, n, &dev->ctxlist->head, head) {