提交 7707ea3b 编写于 作者: D Dave Jones

[AGPGART] Remove pointless assignment.

No point in clearing local pointers then returning.
Also fix up some CodingStyle nits.
Signed-off-by: NDave Jones <davej@redhat.com>
上级 87a17f31
...@@ -124,18 +124,18 @@ static int ati_create_gatt_pages(int nr_tables) ...@@ -124,18 +124,18 @@ static int ati_create_gatt_pages(int nr_tables)
for (i = 0; i < nr_tables; i++) { for (i = 0; i < nr_tables; i++) {
entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL); entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);
if (entry == NULL) { if (entry == NULL) {
while (i>0) { while (i > 0) {
kfree (tables[i-1]); kfree(tables[i-1]);
i--; i--;
} }
kfree (tables); kfree(tables);
tables = NULL;
retval = -ENOMEM; retval = -ENOMEM;
break; break;
} }
tables[i] = entry; tables[i] = entry;
retval = ati_create_page_map(entry); retval = ati_create_page_map(entry);
if (retval != 0) break; if (retval != 0)
break;
} }
ati_generic_private.num_tables = nr_tables; ati_generic_private.num_tables = nr_tables;
ati_generic_private.gatt_pages = tables; ati_generic_private.gatt_pages = tables;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册