linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Dave Jones <davej@codemonkey.org.uk>
Cc: linux-kernel@vger.kernel.org, James Lamanna <jlamanna@gmail.com>
Subject: [PATCH] agp: backend: vfree() checking cleanup
Date: Thu, 15 Sep 2005 23:37:24 +0400	[thread overview]
Message-ID: <20050915193724.GA21565@mipter.zuzino.mipt.ru> (raw)

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(-)

--- 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;
 }
 


                 reply	other threads:[~2005-09-15 19:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050915193724.GA21565@mipter.zuzino.mipt.ru \
    --to=adobriyan@gmail.com \
    --cc=davej@codemonkey.org.uk \
    --cc=jlamanna@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).