git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
char
/
agp
/
amd-k7-agp.c
diff --git
a/drivers/char/agp/amd-k7-agp.c
b/drivers/char/agp/amd-k7-agp.c
index
1f77665
..
c85c8ca
100644
(file)
--- a/
drivers/char/agp/amd-k7-agp.c
+++ b/
drivers/char/agp/amd-k7-agp.c
@@
-101,6
+101,11
@@
static int amd_create_gatt_pages(int nr_tables)
for (i = 0; i < nr_tables; i++) {
entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);
if (entry == NULL) {
for (i = 0; i < nr_tables; i++) {
entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);
if (entry == NULL) {
+ while (i > 0) {
+ kfree(tables[i-1]);
+ i--;
+ }
+ kfree(tables);
retval = -ENOMEM;
break;
}
retval = -ENOMEM;
break;
}
@@
-118,7
+123,7
@@
static int amd_create_gatt_pages(int nr_tables)
return retval;
}
return retval;
}
-/* Since we don't need contig
i
ous memory we just try
+/* Since we don't need contig
u
ous memory we just try
* to get the gatt table once
*/
* to get the gatt table once
*/