diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2005-06-30 16:00:35 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2005-06-30 16:00:35 +0000 |
commit | e2ba08d28335b43515ccbefcc21052ed0d5a7e47 (patch) | |
tree | b6f849906d15835af0769a3213e72b651f25de30 | |
parent | 1b4ce02506afa65494956468afb0eb7f93b74fbc (diff) |
release can happen before dev->ctxlist is allocated
-rw-r--r-- | linux-core/drm_fops.c | 2 |
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) { |