ALSA: asihpi - Simplify dsp code close.
authorEliot Blennerhassett <eblennerhassett@audioscience.com>
Thu, 22 Dec 2011 00:38:44 +0000 (13:38 +1300)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Dec 2011 07:13:06 +0000 (08:13 +0100)
dsp_code struct is not created if firmware is invalid, so check
and zero of firmware pointer is not necessary

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/hpidspcd.c

index 21cdb9e39fbaa247f87fa6c930d679f69b80ae28..456a758f04f6112ee7c75bf2a9c842cc711b70c3 100644 (file)
@@ -109,11 +109,8 @@ error1:
 /*-------------------------------------------------------------------*/
 void hpi_dsp_code_close(struct dsp_code *dsp_code)
 {
-       if (dsp_code->pvt->firmware) {
-               HPI_DEBUG_LOG(DEBUG, "dsp code closed\n");
-               release_firmware(dsp_code->pvt->firmware);
-               dsp_code->pvt->firmware = NULL;
-       }
+       HPI_DEBUG_LOG(DEBUG, "dsp code closed\n");
+       release_firmware(dsp_code->pvt->firmware);
        kfree(dsp_code->pvt);
 }