diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-06-20 16:37:24 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-06-20 16:37:24 +0000 |
commit | 4b0b98bba18e2ede1385fbdd6327b29a5e5cbc4a (patch) | |
tree | ad3a553e2f0fb6cdad0c032d15d1f6ffb58d9b87 /sys/dev/drm/drm_bufs.c | |
parent | ed4bbcb2e79c2088bfc72e584d618c189f96c2e5 (diff) | |
download | FreeBSD-src-4b0b98bba18e2ede1385fbdd6327b29a5e5cbc4a.zip FreeBSD-src-4b0b98bba18e2ede1385fbdd6327b29a5e5cbc4a.tar.gz |
Don't panic if drm_rmmap is called with a NULL map pointer.
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm/drm_bufs.c')
-rw-r--r-- | sys/dev/drm/drm_bufs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/drm/drm_bufs.c b/sys/dev/drm/drm_bufs.c index 6016c98..647dee9 100644 --- a/sys/dev/drm/drm_bufs.c +++ b/sys/dev/drm/drm_bufs.c @@ -296,6 +296,9 @@ void drm_rmmap(struct drm_device *dev, drm_local_map_t *map) { DRM_SPINLOCK_ASSERT(&dev->dev_lock); + if (map == NULL) + return; + TAILQ_REMOVE(&dev->maplist, map, link); switch (map->type) { |