From: Alex Deucher Date: Sat, 7 Mar 2009 23:21:21 +0000 (-0500) Subject: drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup() X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=08932156cc2d4f8807dc5ca5c3d6ccd85080610a;p=linux-2.6-omap-h63xx.git drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup() Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 37249b26f83..f915f1153b4 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)