diff options
author | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-04-21 16:07:17 +0000 |
---|---|---|
committer | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-04-21 16:07:17 +0000 |
commit | 46e06192a88834a97257d2be5ab3aa7c325a1cfe (patch) | |
tree | 3a77c3f79e6415aaff35c6fbd22f256269ced8a0 /linux/i830_dma.c | |
parent | da35a90d99cf56a8ffc48f87754013d13e1cafcd (diff) |
Check for NULL map before calling DRM(ioremapfree) on cleanup. Prevents an
oops if a map wasn't found (e.g. XFree86 Bugzilla #108)
Diffstat (limited to 'linux/i830_dma.c')
-rw-r--r-- | linux/i830_dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/i830_dma.c b/linux/i830_dma.c index 1018fdcb..b76d2b11 100644 --- a/linux/i830_dma.c +++ b/linux/i830_dma.c @@ -280,7 +280,8 @@ static int i830_dma_cleanup(drm_device_t *dev) for (i = 0; i < dma->buf_count; i++) { drm_buf_t *buf = dma->buflist[ i ]; drm_i830_buf_priv_t *buf_priv = buf->dev_private; - DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total); + if ( buf_priv->kernel_virtual && buf->total ) + DRM(ioremapfree)(buf_priv->kernel_virtual, buf->total); } } return 0; |