[PATCH] no need to check vfree arg for null in oss/sequencer
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 28 Mar 2006 09:56:50 +0000 (01:56 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 28 Mar 2006 17:16:08 +0000 (09:16 -0800)
There's no need to check pointers for NULL before handing them to vfree().

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/sequencer.c

index 347cd79c2502aa23b5af9ad62b4f81ce32cfb705..6815c30e0bc1be68fd9589040b167499b5b2cde5 100644 (file)
@@ -1671,14 +1671,7 @@ void sequencer_init(void)
 
 void sequencer_unload(void)
 {
-       if(queue)
-       {
-               vfree(queue);
-               queue=NULL;
-       }
-       if(iqueue)
-       {
-               vfree(iqueue);
-               iqueue=NULL;
-       }
+       vfree(queue);
+       vfree(iqueue);
+       queue = iqueue = NULL;
 }