drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()

Previous thread: drm: read EDID extensions from monitor by Linux Kernel Mailing List on Monday, March 30, 2009 - 2:03 pm. (1 message)

Next thread: drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c by Linux Kernel Mailing List on Monday, March 30, 2009 - 2:03 pm. (1 message)
From: Linux Kernel Mailing List
Date: Monday, March 30, 2009 - 2:02 pm

Gitweb:     http://git.kernel.org/linus/08932156cc2d4f8807dc5ca5c3d6ccd85080610a
Commit:     08932156cc2d4f8807dc5ca5c3d6ccd85080610a
Parent:     53c379e9462b59d4e166429ff064aaf0e7743795
Author:     Alex Deucher <alexdeucher@gmail.com>
AuthorDate: Sat Mar 7 18:21:21 2009 -0500
Committer:  Dave Airlie <airlied@redhat.com>
CommitDate: Fri Mar 13 14:24:17 2009 +1000

    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>
---
 drivers/gpu/drm/radeon/r600_cp.c |    3 +++
 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 37249b2..f915f11 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)
--

Previous thread: drm: read EDID extensions from monitor by Linux Kernel Mailing List on Monday, March 30, 2009 - 2:03 pm. (1 message)

Next thread: drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c by Linux Kernel Mailing List on Monday, March 30, 2009 - 2:03 pm. (1 message)