aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/ati-agp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 16:26:58 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 16:26:58 -0500
commit7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f (patch)
treed56af89cd433440e3b9c94a830838d34b502e446 /drivers/char/agp/ati-agp.c
parent3f00d3e8fb963968a922d821a9a53b503b687e81 (diff)
parent0a1cc0b6a4abaed5f891d1be3e3d0d7b9b719287 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r--drivers/char/agp/ati-agp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 0b6e72642d6e..fbd415565463 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -118,14 +118,12 @@ static int ati_create_gatt_pages(int nr_tables)
118 int retval = 0; 118 int retval = 0;
119 int i; 119 int i;
120 120
121 tables = kmalloc((nr_tables + 1) * sizeof(ati_page_map *), 121 tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL);
122 GFP_KERNEL);
123 if (tables == NULL) 122 if (tables == NULL)
124 return -ENOMEM; 123 return -ENOMEM;
125 124
126 memset(tables, 0, sizeof(ati_page_map *) * (nr_tables + 1));
127 for (i = 0; i < nr_tables; i++) { 125 for (i = 0; i < nr_tables; i++) {
128 entry = kmalloc(sizeof(ati_page_map), GFP_KERNEL); 126 entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL);
129 if (entry == NULL) { 127 if (entry == NULL) {
130 while (i>0) { 128 while (i>0) {
131 kfree (tables[i-1]); 129 kfree (tables[i-1]);
@@ -136,7 +134,6 @@ static int ati_create_gatt_pages(int nr_tables)
136 retval = -ENOMEM; 134 retval = -ENOMEM;
137 break; 135 break;
138 } 136 }
139 memset(entry, 0, sizeof(ati_page_map));
140 tables[i] = entry; 137 tables[i] = entry;
141 retval = ati_create_page_map(entry); 138 retval = ati_create_page_map(entry);
142 if (retval != 0) break; 139 if (retval != 0) break;
@@ -524,6 +521,7 @@ static struct pci_device_id agp_ati_pci_table[] = {
524MODULE_DEVICE_TABLE(pci, agp_ati_pci_table); 521MODULE_DEVICE_TABLE(pci, agp_ati_pci_table);
525 522
526static struct pci_driver agp_ati_pci_driver = { 523static struct pci_driver agp_ati_pci_driver = {
524 .owner = THIS_MODULE,
527 .name = "agpgart-ati", 525 .name = "agpgart-ati",
528 .id_table = agp_ati_pci_table, 526 .id_table = agp_ati_pci_table,
529 .probe = agp_ati_probe, 527 .probe = agp_ati_probe,