]> err.no Git - linux-2.6/commitdiff
[ALSA] Big kfree NULL check cleanup - sound
authorJesper Juhl <jesper.juhl@gmail.com>
Mon, 24 Oct 2005 13:11:28 +0000 (15:11 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 4 Nov 2005 12:19:55 +0000 (13:19 +0100)
Modules: AD1889 driver,RME9652 driver

This is the sound/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in sound/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ad1889.c
sound/pci/rme9652/hdspm.c

index d7d99a25c5e53dffb1ac797c62d8ffac2a9db212..e72ccd1a004f9dce58479a507dfced1a8f8374cd 100644 (file)
@@ -50,7 +50,7 @@
 #include "ad1889.h"
 #include "ac97/ac97_id.h"
 
-#define        AD1889_DRVVER   "$Revision: 1.3 $"
+#define        AD1889_DRVVER   "$Revision: 1.4 $"
 
 MODULE_AUTHOR("Kyle McMartin <kyle@parisc-linux.org>, Thibaut Varene <t-bone@parisc-linux.org>");
 MODULE_DESCRIPTION("Analog Devices AD1889 ALSA sound driver");
@@ -982,8 +982,7 @@ snd_ad1889_create(snd_card_t *card,
        return 0;
 
 free_and_ret:
-       if (chip)
-               kfree(chip);
+       kfree(chip);
        pci_disable_device(pci);
 
        return err;
index fc3f3283ff37e28ccef26b506a16784cf60f97c3..60a1141f13271241b84daac4a14bed74e790fe8e 100644 (file)
@@ -3563,8 +3563,7 @@ static int snd_hdspm_free(hdspm_t * hdspm)
                free_irq(hdspm->irq, (void *) hdspm);
 
 
-       if (hdspm->mixer)
-               kfree(hdspm->mixer);
+       kfree(hdspm->mixer);
 
        if (hdspm->iobase)
                iounmap(hdspm->iobase);