aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-07-07 06:17:42 -0400
committerDave Airlie <airlied@linux.ie>2005-07-07 06:17:42 -0400
commitf650130803c4c0b5e5d76eff24faae722e3a69e2 (patch)
treef31074082bcdda3188917706fb040b67cce8a40e /drivers/char
parent0c7b525c344bc29a760c37053f8d5c80292ee1be (diff)
drm: ctx release can happen before dev->ctxlist is allocated
From: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
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 ) {