agp: backend: vfree() checking cleanup
diff mbox series

Message ID 20050915193724.GA21565@mipter.zuzino.mipt.ru
State New, archived
Headers show
Series
  • agp: backend: vfree() checking cleanup
Related show

Commit Message

Alexey Dobriyan Sept. 15, 2005, 7:37 p.m. UTC
From: James Lamanna <jlamanna@gmail.com>

Signed-off by: James Lamanna <jlamanna@gmail.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/char/agp/backend.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -135,7 +135,7 @@  static int agp_find_max(void)
 
 static int agp_backend_initialize(struct agp_bridge_data *bridge)
 {
-	int size_value, rc, got_gatt=0, got_keylist=0;
+	int size_value, rc, got_gatt=0;
 
 	bridge->max_memory_agp = agp_find_max();
 	bridge->version = &agp_current_version;
@@ -173,7 +173,6 @@  static int agp_backend_initialize(struct
 		rc = -ENOMEM;
 		goto err_out;
 	}
-	got_keylist = 1;
 
 	/* FIXME vmalloc'd memory not guaranteed contiguous */
 	memset(bridge->key_list, 0, PAGE_SIZE * 4);
@@ -192,10 +191,8 @@  err_out:
 				gart_to_virt(bridge->scratch_page_real));
 	if (got_gatt)
 		bridge->driver->free_gatt_table(bridge);
-	if (got_keylist) {
-		vfree(bridge->key_list);
-		bridge->key_list = NULL;
-	}
+	vfree(bridge->key_list);
+	bridge->key_list = NULL;
 	return rc;
 }