fix some more NULLs from kernel

main
Dave Airlie 2004-07-20 11:22:26 +00:00
parent 7ee263b94f
commit fdb6ae31cb
4 changed files with 6 additions and 6 deletions

View File

@ -877,7 +877,7 @@ int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
buf->waiting = 0;
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
buf->filp = 0;
buf->filp = NULL;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),

View File

@ -178,7 +178,7 @@ static int i810_map_buffer(drm_buf_t *buf, struct file *filp)
/* Real error */
DRM_ERROR("mmap error\n");
retcode = (signed int)buf_priv->virtual;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
}
up_write( &current->mm->mmap_sem );
@ -200,7 +200,7 @@ static int i810_unmap_buffer(drm_buf_t *buf)
up_write(&current->mm->mmap_sem);
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
return retcode;
}

View File

@ -877,7 +877,7 @@ int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
buf->waiting = 0;
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
buf->filp = 0;
buf->filp = NULL;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),

View File

@ -178,7 +178,7 @@ static int i810_map_buffer(drm_buf_t *buf, struct file *filp)
/* Real error */
DRM_ERROR("mmap error\n");
retcode = (signed int)buf_priv->virtual;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
}
up_write( &current->mm->mmap_sem );
@ -200,7 +200,7 @@ static int i810_unmap_buffer(drm_buf_t *buf)
up_write(&current->mm->mmap_sem);
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
return retcode;
}