LWN.net Logo

vfree cleanup for sound/oss/sequencer.c

From:  Jesper Juhl <juhl-lkml@dif.dk>
To:  linux-kernel <linux-kernel@vger.kernel.org>
Subject:  [PATCH] vfree cleanup for sound/oss/sequencer.c
Date:  Thu, 30 Jun 2005 22:28:27 +0200 (CEST)
Cc:  Hannu Savolainen <hannu@opensound.com>, linux-sound <linux-sound@vger.kernel.org>, akpm@osdl.org
Archive-link:  Article, Thread

Don't bother checking for NULL, vfree can handle it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 sound/oss/sequencer.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

--- linux-2.6.13-rc1-orig/sound/oss/sequencer.c	2005-06-17 21:48:29.000000000 +0200
+++ linux-2.6.13-rc1/sound/oss/sequencer.c	2005-06-30 22:21:49.000000000 +0200
@@ -1671,14 +1671,8 @@ void sequencer_init(void)
 
 void sequencer_unload(void)
 {
-	if(queue)
-	{
-		vfree(queue);
-		queue=NULL;
-	}
-	if(iqueue)
-	{
-		vfree(iqueue);
-		iqueue=NULL;
-	}
+	vfree(queue);
+	queue = NULL;
+	vfree(iqueue);
+	iqueue = NULL;
 }



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


Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds