diff options
-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) { |