]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
authorAlex Deucher <alexdeucher@gmail.com>
Sat, 7 Mar 2009 23:21:21 +0000 (18:21 -0500)
committerDave Airlie <airlied@redhat.com>
Fri, 13 Mar 2009 04:24:17 +0000 (14:24 +1000)
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600_cp.c

index 37249b26f836ebd0cd413a37a613588c69d50aa0..f915f1153b41b550b5f4f688ebf2a7f1af74ddc2 100644 (file)
@@ -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)