diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-06-29 13:00:29 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-06-29 13:00:29 +0000 |
commit | 6496c5d1e74532d8208774653a3a2a477d7fc50c (patch) | |
tree | 665b38ab1ed2f93bb74636ec481c050c6f6fbc97 | |
parent | 6975571c3b740e3a3813058a856fc6bd8b7fbd14 (diff) |
silence warning
-rw-r--r-- | linux-core/drm_bufs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index e5d4c6bff..baa963050 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -373,7 +373,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp, drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->head->dev; drm_map_t request; - drm_local_map_t *map; + drm_local_map_t *map = NULL; struct list_head *list; int ret; @@ -401,6 +401,9 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp, return -EINVAL; } + if (!map) + return -EINVAL; + /* Register and framebuffer maps are permanent */ if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) { up(&dev->struct_sem); |