Skip to contentSkip to conversation

Big kfree NULL check cleanup - sound

PATCH In review Jesper Juhl 1 participant 1 message Oct 13, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 13/14 Big kfree NULL check cleanup - sound

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

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

Sorry about the long Cc: list, but I wanted to make sure I included everyone who's code I've changed with this patch.

---

Please see the initial announcement mail on LKML with subject "[PATCH 00/14] Big kfree NULL check cleanup"
for additional details.

 sound/pci/ad1889.c        |    3 +--
 sound/pci/rme9652/hdspm.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
sound/pci/rme9652/hdspm.c +1 -2
@@ -3563,8 +3563,7 @@ static int snd_hdspm_free(hdspm_t * hdsp
 		free_irq(hdspm->irq, (void *) hdspm);
 
 
-	if (hdspm->mixer)
-		kfree(hdspm->mixer);
+	kfree(hdspm->mixer);
 
 	if (hdspm->iobase)
 		iounmap(hdspm->iobase);
sound/pci/ad1889.c +1 -2
@@ -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;