aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/drm/drm_fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 7f9b00c6d244..a53322d8c229 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -259,7 +259,7 @@ int drm_release( struct inode *inode, struct file *filp )
259 drm_fasync( -1, filp, 0 ); 259 drm_fasync( -1, filp, 0 );
260 260
261 down( &dev->ctxlist_sem ); 261 down( &dev->ctxlist_sem );
262 if ( !list_empty( &dev->ctxlist->head ) ) { 262 if ( dev->ctxlist && (!list_empty(&dev->ctxlist->head))) {
263 drm_ctx_list_t *pos, *n; 263 drm_ctx_list_t *pos, *n;
264 264
265 list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) { 265 list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {