summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-03-08 00:21:21 +0100
committerDave Airlie <airlied@redhat.com>2009-03-13 05:24:17 +0100
commit08932156cc2d4f8807dc5ca5c3d6ccd85080610a (patch)
treecf14e4ba254757a20e0ee4393ce3459d2069b816 /drivers
parentradeon: call the correct idle function, logic got inverted. (diff)
downloadlinux-08932156cc2d4f8807dc5ca5c3d6ccd85080610a.tar.xz
linux-08932156cc2d4f8807dc5ca5c3d6ccd85080610a.zip
drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/r600_cp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index 37249b26f836..f915f1153b41 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -121,6 +121,9 @@ void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
int pages;
int i;
+ if (!entry)
+ return;
+
if (gart_info->bus_addr) {
max_pages = (gart_info->table_size / sizeof(u32));
pages = (entry->pages <= max_pages)